title
PHP For Beginners | 3+ Hour Crash Course
description
Your first step in learning PHP. We will go over all of the fundamentals and create a small PHP/MySQL project.
⭐ Sponsor:
https://linode.com/traversy
💻 Github Repo:
https://github.com/bradtraversy/php-crash
💻 Download Xampp:
https://apachefriends.com
👇 PHP OOP MVC Udemy Course:
https://www.udemy.com/course/object-oriented-php-mvc
💖 Show Support
Patreon: https://www.patreon.com/traversymedia
PayPal: https://paypal.me/traversymedia
👇 Follow Me On Social Media:
Twitter: https://twitter.com/traversymedia
Instagram: https://www.instagram.com/traversymedia
Linkedin: https://www.linkedin.com/in/bradtraversy
Timestamps:
0:00 - Intro
0:59 - Linode Sponsor
1:40 - Slides
9:47 - Getting Setup With XAMPP
14:30 - Opening a PHP File
15:38 - VS Code Setup & Auto Reload
18:20 - Output Constructs & Functions
26:35 - Data Types & Variables
34:32 - Arrays
42:05 - Conditionals
52:57 - Loops
1:02:00 - Functions
1:09:47 - Array Functions
1:24:15 - String Functions
1:30:28 - Superglobals
1:34:05 - $_GET & $_POST
1:40:56 - Sanitizing Inputs
1:45:24 - Cookies
1:49:10 - Sessions
1:58:45 - File Handling
2:03:48 - File Uploading
2:17:20 - Erros & Exceptions
2:22:05 - OOP & Classes
2:35:14 - Feedback App Project
2:38:15 - Including PHP Pages
2:42:23 - Database & Feedback Table Setup
2:48:45 - Connecting To MySQL
2:53:54 - If & Foreach Shorthands
2:58:11 - Fetch From Database
3:01:05 - Inserting Data From a Form
detail
{'title': 'PHP For Beginners | 3+ Hour Crash Course', 'heatmap': [{'end': 1176.806, 'start': 699.29, 'weight': 0.792}, {'end': 6105.7, 'start': 5983.065, 'weight': 0.724}, {'end': 10100.638, 'start': 9974.911, 'weight': 0.801}], 'summary': 'This 3+ hour php crash course for beginners covers absolute basics, creating a sandbox, building a small feedback application, and provides a 160-day credit for new linode users. it includes practical web development, php configuration, data types, arrays, conditional statements, loop types, functions, superglobals, login and session management, file handling, exception handling, object-oriented programming, and database operations.', 'chapters': [{'end': 100.314, 'segs': [{'end': 80.279, 'src': 'embed', 'start': 17.565, 'weight': 0, 'content': [{'end': 23.07, 'text': 'so this is for anyone that is looking to learn php or for those of you that already know it, that want a refresher.', 'start': 17.565, 'duration': 5.505}, {'end': 30.952, 'text': "So we're going to start with the absolute basics and create a sandbox with different files focusing on different aspects of PHP,", 'start': 23.49, 'duration': 7.462}, {'end': 34.913, 'text': 'so that you can learn all the fundamentals of the language and the syntax.', 'start': 30.952, 'duration': 3.961}, {'end': 42.454, 'text': "After that, we'll build a small feedback application that will connect to a MySQL database and allow us to add feedback,", 'start': 35.393, 'duration': 7.061}, {'end': 45.135, 'text': 'as well as read it and display it from the database.', 'start': 42.454, 'duration': 2.681}, {'end': 47.636, 'text': "So there's a GitHub repo in the description.", 'start': 45.635, 'duration': 2.001}, {'end': 51.257, 'text': "I'll have all the timestamps down there as well if you want to skip around.", 'start': 47.756, 'duration': 3.501}, {'end': 52.977, 'text': "So let's go ahead and get into it.", 'start': 51.657, 'duration': 1.32}, {'end': 61.012, 'text': 'This PHP course is sponsored by Linode.', 'start': 58.971, 'duration': 2.041}, {'end': 65.352, 'text': 'Linode is one of the most reputable cloud companies and can be used to host any type of project.', 'start': 61.072, 'duration': 4.28}, {'end': 68.635, 'text': 'Many cloud hosting companies can get really expensive really quick.', 'start': 65.654, 'duration': 2.981}, {'end': 72.816, 'text': 'And one great thing about Linode is their monthly caps, which keeps your bill predictable.', 'start': 68.835, 'duration': 3.981}, {'end': 77.138, 'text': 'For example, the base plan is three cents per hour with a monthly cap of twenty dollars.', 'start': 73.156, 'duration': 3.982}, {'end': 80.279, 'text': 'so you never end up racking unexpected charges.', 'start': 77.458, 'duration': 2.821}], 'summary': 'Php course covers basics, mysql feedback app, linode sponsorship with monthly caps.', 'duration': 62.714, 'max_score': 17.565, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU17565.jpg'}], 'start': 0.409, 'title': 'Php crash course for beginners', 'summary': 'Introduces a php crash course for beginners, covering absolute basics, creating a sandbox with different files, and building a small feedback application that connects to a mysql database. the course is sponsored by linode, offering a 160-day credit for new users.', 'chapters': [{'end': 100.314, 'start': 0.409, 'title': 'Php crash course for beginners', 'summary': 'Introduces a php crash course for beginners, covering the absolute basics, creating a sandbox with different files, and building a small feedback application that connects to a mysql database. the course is sponsored by linode, offering a 160-day credit for new users.', 'duration': 99.905, 'highlights': ['The PHP crash course covers the absolute basics and creates a sandbox with different files focusing on different aspects of PHP, catering to both beginners and those seeking a refresher.', 'A small feedback application will be built, connecting to a MySQL database to add, read, and display feedback, providing practical application of PHP skills.', "Linode, the sponsor, offers a 160-day credit for new users, emphasizing their monthly caps to keep bills predictable and highlighting their control panel's ease of use for project deployment and management."]}], 'duration': 99.905, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU409.jpg', 'highlights': ['The PHP crash course covers the absolute basics and creates a sandbox with different files focusing on different aspects of PHP, catering to both beginners and those seeking a refresher.', 'A small feedback application will be built, connecting to a MySQL database to add, read, and display feedback, providing practical application of PHP skills.', "Linode, the sponsor, offers a 160-day credit for new users, emphasizing their monthly caps to keep bills predictable and highlighting their control panel's ease of use for project deployment and management."]}, {'end': 1220.222, 'segs': [{'end': 145.764, 'src': 'embed', 'start': 100.354, 'weight': 0, 'content': [{'end': 107.599, 'text': 'So before we get into setting up our environment and learning PHP, I want to talk a little bit about what it is and how it works.', 'start': 100.354, 'duration': 7.245}, {'end': 112.082, 'text': 'So PHP is a general purpose scripting language geared toward web development.', 'start': 107.839, 'duration': 4.243}, {'end': 117.786, 'text': "So PHP doesn't run or get processed in the browser like JavaScript does.", 'start': 112.562, 'duration': 5.224}, {'end': 122.149, 'text': 'It runs server-side, just like Python or C Sharp or any other language.', 'start': 118.286, 'duration': 3.863}, {'end': 124.991, 'text': 'Now, as I said, it is geared towards web development.', 'start': 122.589, 'duration': 2.402}, {'end': 128.393, 'text': "It's important to mention that it is used for other things as well,", 'start': 125.391, 'duration': 3.002}, {'end': 133.776, 'text': "but I think that the reason it's used mostly for web development is because of its practicality.", 'start': 128.393, 'duration': 5.383}, {'end': 135.157, 'text': 'PHP is interpreted.', 'start': 133.877, 'duration': 1.28}, {'end': 136.578, 'text': "It doesn't have to be compiled.", 'start': 135.217, 'duration': 1.361}, {'end': 140.481, 'text': 'It can be written alongside HTML using PHP tags.', 'start': 136.959, 'duration': 3.522}, {'end': 145.764, 'text': 'You can load .php files in the browser to make a request from the server.', 'start': 140.921, 'duration': 4.843}], 'summary': 'Php is a server-side scripting language for web development, interpreted and practical, used alongside html.', 'duration': 45.41, 'max_score': 100.354, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU100354.jpg'}, {'end': 216.051, 'src': 'embed', 'start': 191.406, 'weight': 6, 'content': [{'end': 200.768, 'text': 'For PHP to work on your local machine you have to install PHP itself along with some kind of web server like Apache or Nginx.', 'start': 191.406, 'duration': 9.362}, {'end': 209.45, 'text': "So this image here I found on phptutorial.net and I think it's simple enough to understand and it shows what happens when we use PHP.", 'start': 201.288, 'duration': 8.162}, {'end': 216.051, 'text': 'So we can put a URL in the address bar with a php extension, just like we would an HTML file,', 'start': 209.91, 'duration': 6.141}], 'summary': 'To run php locally, install php and a web server like apache or nginx.', 'duration': 24.645, 'max_score': 191.406, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU191406.jpg'}, {'end': 298.308, 'src': 'embed', 'start': 265.813, 'weight': 9, 'content': [{'end': 269.515, 'text': "Now, when we say Linux, we're usually talking about your production environment.", 'start': 265.813, 'duration': 3.702}, {'end': 277.719, 'text': "when you buy hosting, whether it's cloud hosting or like cPanel or something like that, it's usually Linux that is that it's running on.", 'start': 269.975, 'duration': 7.744}, {'end': 281.62, 'text': "There are Windows servers, but most of the time you're dealing with Linux.", 'start': 278.739, 'duration': 2.881}, {'end': 285.502, 'text': 'However, for development, you can use whatever you like.', 'start': 282.481, 'duration': 3.021}, {'end': 286.963, 'text': "So I'm on a Mac.", 'start': 285.602, 'duration': 1.361}, {'end': 288.083, 'text': 'Windows is fine.', 'start': 287.263, 'duration': 0.82}, {'end': 290.604, 'text': 'I just I feel like for beginners.', 'start': 288.103, 'duration': 2.501}, {'end': 298.308, 'text': 'when they hear lamp stack and they hear Linux, they think that that means they have to use Linux, which is very far from the truth.', 'start': 290.604, 'duration': 7.704}], 'summary': 'Linux is the primary choice for hosting, with windows servers being less common, but development can be done on any platform.', 'duration': 32.495, 'max_score': 265.813, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU265813.jpg'}, {'end': 343.66, 'src': 'embed', 'start': 313.953, 'weight': 1, 'content': [{'end': 321.196, 'text': 'these are our suites that include everything that you need, such as php, apache, mysql.', 'start': 313.953, 'duration': 7.243}, {'end': 326.997, 'text': 'it includes it all in one place, one installation, and XAMPP is what I would suggest for beginners.', 'start': 321.196, 'duration': 5.801}, {'end': 335.939, 'text': 'The X stands for cross-platform, and then you have Apache, MySQL, PHP, and then Perl, which is another language completely.', 'start': 327.057, 'duration': 8.882}, {'end': 343.66, 'text': 'So you also have MAMP and WAMP, which are similar for Mac and Windows, although I believe those are cross-platform as well.', 'start': 336.579, 'duration': 7.081}], 'summary': 'Xampp is a recommended suite for beginners, offering php, apache, mysql, and perl in one cross-platform installation.', 'duration': 29.707, 'max_score': 313.953, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU313953.jpg'}, {'end': 405.345, 'src': 'embed', 'start': 378.011, 'weight': 10, 'content': [{'end': 387.076, 'text': "I think most of the people that hate on it either haven't used it or just want to sound smart or cool by jumping on the bandwagon.", 'start': 378.011, 'duration': 9.065}, {'end': 391.858, 'text': 'Or there are people that maybe used it a long time ago around version 4 or so.', 'start': 387.656, 'duration': 4.202}, {'end': 396, 'text': 'And PHP is now in version 8 and has made a ton of improvements.', 'start': 392.258, 'duration': 3.742}, {'end': 398.682, 'text': 'So my advice would be to ignore those people.', 'start': 396.461, 'duration': 2.221}, {'end': 399.542, 'text': "Don't let..", 'start': 398.702, 'duration': 0.84}, {'end': 405.345, 'text': 'what other people say get in the way of what you want to learn.', 'start': 401.663, 'duration': 3.682}], 'summary': 'Php has made significant improvements, currently in version 8, so ignore outdated criticisms and focus on learning.', 'duration': 27.334, 'max_score': 378.011, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU378011.jpg'}, {'end': 484.406, 'src': 'embed', 'start': 461.048, 'weight': 2, 'content': [{'end': 468.173, 'text': "So WordPress is a content management system built on PHP, and it's extremely popular, especially in the world of freelancing.", 'start': 461.048, 'duration': 7.125}, {'end': 474.117, 'text': 'So clients love to be able to log in and edit their content, and WordPress gives them that ability.', 'start': 468.693, 'duration': 5.424}, {'end': 479.682, 'text': "It's not like cutting edge when it comes to web technologies, when it comes to like performance.", 'start': 474.517, 'duration': 5.165}, {'end': 484.406, 'text': "But the truth of the matter is in many situations that isn't really important.", 'start': 480.082, 'duration': 4.324}], 'summary': 'Wordpress, popular in freelancing, allows clients to edit content, despite not being cutting edge in web technologies.', 'duration': 23.358, 'max_score': 461.048, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU461048.jpg'}, {'end': 543.455, 'src': 'embed', 'start': 514.999, 'weight': 3, 'content': [{'end': 518.32, 'text': 'if you want to use react or some other javascript framework.', 'start': 514.999, 'duration': 3.321}, {'end': 524.984, 'text': 'And then Laravel is an extremely powerful framework for building apps and APIs.', 'start': 518.919, 'duration': 6.065}, {'end': 529.947, 'text': 'So for larger and more customized projects, Laravel has you covered in that area.', 'start': 525.064, 'duration': 4.883}, {'end': 534.85, 'text': 'And some people say PHP is a very ugly language because of its syntax.', 'start': 530.347, 'duration': 4.503}, {'end': 541.474, 'text': 'But even people that say that hate PHP still seem to have respect for Laravel as a framework.', 'start': 534.93, 'duration': 6.544}, {'end': 543.455, 'text': "because it's very full featured.", 'start': 541.994, 'duration': 1.461}], 'summary': 'Laravel is a powerful framework for building apps and apis, respected even by php critics.', 'duration': 28.456, 'max_score': 514.999, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU514999.jpg'}, {'end': 1176.806, 'src': 'heatmap', 'start': 691.484, 'weight': 5, 'content': [{'end': 698.85, 'text': 'And then once you advance and you learn more, you can start to get into Docker and create containers and all that.', 'start': 691.484, 'duration': 7.366}, {'end': 704.734, 'text': 'But for beginners, I think XAMPP is the best way to get set up on Windows or Mac.', 'start': 699.29, 'duration': 5.444}, {'end': 707.877, 'text': "If you're on Linux, I suspect you know what you're doing anyway.", 'start': 705.115, 'duration': 2.762}, {'end': 708.793, 'text': 'All right.', 'start': 708.493, 'duration': 0.3}, {'end': 710.494, 'text': 'So just download and install it.', 'start': 708.853, 'duration': 1.641}, {'end': 714.216, 'text': "And if you already have PHP on your system, then that's absolutely fine.", 'start': 710.734, 'duration': 3.482}, {'end': 716.458, 'text': "But if you don't, I'd suggest installing this.", 'start': 714.277, 'duration': 2.181}, {'end': 720.78, 'text': "Once you open it up, you're going to see a panel similar to this.", 'start': 717.118, 'duration': 3.662}, {'end': 723.222, 'text': "It's going to look different on Windows.", 'start': 721.761, 'duration': 1.461}, {'end': 726.184, 'text': "If you're on Mac, you're just going to want to click start to start it up.", 'start': 723.282, 'duration': 2.902}, {'end': 731.626, 'text': 'And then under services, you want to start up your Apache server and your MySQL database.', 'start': 726.764, 'duration': 4.862}, {'end': 732.487, 'text': 'Just click start.', 'start': 731.706, 'duration': 0.781}, {'end': 736.008, 'text': "If you're on Windows, you should see Apache and MySQL.", 'start': 732.927, 'duration': 3.081}, {'end': 738.569, 'text': "I believe you'll see like some red X's over here.", 'start': 736.048, 'duration': 2.521}, {'end': 743.031, 'text': "Just click those red X's to start up to start up those services.", 'start': 738.89, 'duration': 4.141}, {'end': 743.932, 'text': 'All right.', 'start': 743.051, 'duration': 0.881}, {'end': 746.473, 'text': "And then if you're on Mac, you want to go to this network tab.", 'start': 743.952, 'duration': 2.521}, {'end': 749.645, 'text': 'and localhost 8080, just click enable.', 'start': 746.963, 'duration': 2.682}, {'end': 751.686, 'text': "So that's gonna be your root.", 'start': 750.005, 'duration': 1.681}, {'end': 754.347, 'text': "On Windows, I believe it's just localhost.", 'start': 752.186, 'duration': 2.161}, {'end': 756.969, 'text': "You don't use port 8080.", 'start': 754.367, 'duration': 2.602}, {'end': 762.632, 'text': "And then under volumes, you'll see here on Mac, we have this opt slash lamp folder.", 'start': 756.969, 'duration': 5.663}, {'end': 764.633, 'text': "That's gonna be our server folder.", 'start': 762.972, 'duration': 1.661}, {'end': 772.158, 'text': "If you're on Windows, it's gonna be in your C drive and it's gonna be in, you'll have a folder called XAMPP, X-A-M-P-P.", 'start': 765.053, 'duration': 7.105}, {'end': 777.94, 'text': "So I'm going to click on explore here and it's going to show us a bunch of folders here.", 'start': 772.998, 'duration': 4.942}, {'end': 781.781, 'text': 'So all of our Apache stuff, all of our MySQL stuff.', 'start': 778.06, 'duration': 3.721}, {'end': 784.902, 'text': "Now, the main folder you're going to want to focus on is this H.T.", 'start': 782.081, 'duration': 2.821}, {'end': 787.603, 'text': 'Docs This is your your server document route.', 'start': 784.922, 'duration': 2.681}, {'end': 792.704, 'text': 'So any any local websites or projects that you create will go in this folder.', 'start': 788.003, 'duration': 4.701}, {'end': 793.444, 'text': 'All right.', 'start': 792.724, 'duration': 0.72}, {'end': 797.966, 'text': "And if you're on Windows, it's going to be in your C drive and then Zamp and then H.T.", 'start': 793.544, 'duration': 4.422}, {'end': 802.976, 'text': 'Docs. so if we open that up, you can see that xampp does have some default stuff in here.', 'start': 797.986, 'duration': 4.99}, {'end': 811.783, 'text': "in fact, if we go to the browser and we go to http localhost now on Windows, it's just going to be localhost.", 'start': 802.976, 'duration': 8.807}, {'end': 816.745, 'text': "on Mac it's going to be port 8080 by default and you're just going to see.", 'start': 811.783, 'duration': 4.962}, {'end': 819.526, 'text': 'I actually have this scaled up right now.', 'start': 816.745, 'duration': 2.781}, {'end': 825.809, 'text': "but you're just going to see this welcome page, which is actually at localhost slash dashboard.", 'start': 819.526, 'duration': 6.283}, {'end': 830.892, 'text': 'it redirects us there by default now from within that htdocs folder.', 'start': 825.809, 'duration': 5.083}, {'end': 834.253, 'text': 'if we create a new folder here, we can name it whatever you want.', 'start': 830.892, 'duration': 3.361}, {'end': 835.974, 'text': "I'm going to call it PHP crash.", 'start': 834.253, 'duration': 1.721}, {'end': 843.459, 'text': 'So if I create a folder in htdocs, I should now be able to go to again localhost on Windows,', 'start': 836.754, 'duration': 6.705}, {'end': 850.003, 'text': 'localhost 8080 on Mac and then slash whatever that folder name, in this case phpcrash.', 'start': 843.459, 'duration': 6.544}, {'end': 853.866, 'text': "Now, it's showing me this because, obviously, I have nothing in here.", 'start': 850.403, 'duration': 3.463}, {'end': 861.911, 'text': "So what I'm going to do is open up this phpcrash folder in my text editor, which I'm using VS Code,", 'start': 853.886, 'duration': 8.025}, {'end': 865.754, 'text': "and I'm going to create a file in here called index.php.", 'start': 861.911, 'duration': 3.843}, {'end': 872.459, 'text': 'And if I come back over here and reload, we should just see just a blank white screen here.', 'start': 866.734, 'duration': 5.725}, {'end': 873.179, 'text': 'All right.', 'start': 872.919, 'duration': 0.26}, {'end': 876.102, 'text': "So it's actually loading this index PHP file.", 'start': 873.219, 'duration': 2.883}, {'end': 880.005, 'text': 'In fact, if I just type in hello and reload, you should now see that.', 'start': 876.142, 'duration': 3.863}, {'end': 882.166, 'text': "And I'm going to just scale this back up.", 'start': 880.425, 'duration': 1.741}, {'end': 889.493, 'text': "So what's happening here is it's loading the index file just like it would if it were an index HTML file.", 'start': 883.067, 'duration': 6.426}, {'end': 892.976, 'text': "When you have an index HTML, that's basically your homepage.", 'start': 890.293, 'duration': 2.683}, {'end': 896.078, 'text': "You don't need to specify the file explicitly.", 'start': 893.016, 'duration': 3.062}, {'end': 897.019, 'text': "So that's what it's doing.", 'start': 896.138, 'duration': 0.881}, {'end': 897.8, 'text': "It's loading this.", 'start': 897.059, 'duration': 0.741}, {'end': 902.944, 'text': 'And PHP files can have, you can have plain text, you can have HTML.', 'start': 898.4, 'duration': 4.544}, {'end': 905.436, 'text': 'So if I were to add an h1 here,', 'start': 902.964, 'duration': 2.472}, {'end': 915.265, 'text': "you'll see that that will parse as an html heading and then any php that i write is going to go within php tags which look like this.", 'start': 905.436, 'duration': 9.829}, {'end': 919.449, 'text': 'so the opening tag is going to be an angle bracket, question mark.', 'start': 915.265, 'duration': 4.184}, {'end': 927.237, 'text': "php ending is question mark and right angle bracket and here i could write some php code like let's say echo hello,", 'start': 919.449, 'duration': 7.788}, {'end': 933.87, 'text': 'And if I come back over here and reload, then you should see that should just say hello.', 'start': 929.366, 'duration': 4.504}, {'end': 937.713, 'text': 'So now you know that that PHP is actually getting parsed in your system.', 'start': 934.05, 'duration': 3.663}, {'end': 938.79, 'text': 'All right.', 'start': 938.55, 'duration': 0.24}, {'end': 942.371, 'text': "So before we get started with the code, there's one more thing I want to do.", 'start': 938.85, 'duration': 3.521}, {'end': 946.152, 'text': 'This is optional for you guys, but I want to have it auto reload.', 'start': 942.431, 'duration': 3.721}, {'end': 950.713, 'text': 'So basically, whenever I save a file, I want it to reload automatically.', 'start': 946.572, 'duration': 4.141}, {'end': 952.213, 'text': "So I don't have to click reload.", 'start': 950.753, 'duration': 1.46}, {'end': 954.674, 'text': 'And this is, again, completely optional.', 'start': 952.633, 'duration': 2.041}, {'end': 957.115, 'text': "I just want to do it because it's a tutorial.", 'start': 955.034, 'duration': 2.081}, {'end': 960.235, 'text': "So there's a couple of things we have to do.", 'start': 958.215, 'duration': 2.02}, {'end': 966.137, 'text': "You're probably if you use this code, you're probably familiar with the live server extension.", 'start': 960.695, 'duration': 5.442}, {'end': 967.458, 'text': 'all right.', 'start': 966.977, 'duration': 0.481}, {'end': 969.5, 'text': 'so you do want to install that.', 'start': 967.458, 'duration': 2.042}, {'end': 973.804, 'text': "however, to use it with php, there's a few extra steps we need to do.", 'start': 969.5, 'duration': 4.304}, {'end': 976.047, 'text': 'so first would be to install that.', 'start': 973.804, 'duration': 2.243}, {'end': 983.234, 'text': 'then we also need the php server extension, which is this right here, so you would install that as well.', 'start': 976.047, 'duration': 7.187}, {'end': 986.238, 'text': 'and then we also need the php intellifence.', 'start': 983.234, 'duration': 3.004}, {'end': 990.52, 'text': 'Yeah, this right here IntelliFence extension.', 'start': 988.239, 'duration': 2.281}, {'end': 992.02, 'text': 'So you want to get those installed.', 'start': 990.56, 'duration': 1.46}, {'end': 998.583, 'text': 'And then you also need to have the live server extension, Chrome or Firefox extension.', 'start': 992.701, 'duration': 5.882}, {'end': 1005.705, 'text': "So if you search for live server, I'm on Chrome, so that's obviously what I would get.", 'start': 999.123, 'duration': 6.582}, {'end': 1008.571, 'text': 'So you want to install this.', 'start': 1007.011, 'duration': 1.56}, {'end': 1009.792, 'text': 'I already have it installed.', 'start': 1008.591, 'duration': 1.201}, {'end': 1016.114, 'text': 'So once you install that, you can click up here and you need to pass in two things here.', 'start': 1010.552, 'duration': 5.562}, {'end': 1019.555, 'text': 'So your actual server address is going to be this here.', 'start': 1016.194, 'duration': 3.361}, {'end': 1023.416, 'text': 'If you called that folder PHP crash again on Windows,', 'start': 1019.695, 'duration': 3.721}, {'end': 1029.818, 'text': "you probably I think it's just local host slash and then the live server address by default is port 5500..", 'start': 1023.416, 'duration': 6.402}, {'end': 1032.098, 'text': 'So you just want to set that up, click apply.', 'start': 1029.818, 'duration': 2.28}, {'end': 1032.919, 'text': 'All right.', 'start': 1032.118, 'duration': 0.801}, {'end': 1042.836, 'text': 'And then once you do that, we should be able to start up live server by going to you can either right click and say uh..', 'start': 1033.019, 'duration': 9.817}, {'end': 1045.454, 'text': 'is it usually?', 'start': 1044.714, 'duration': 0.74}, {'end': 1046.454, 'text': "it's usually.", 'start': 1045.454, 'duration': 1}, {'end': 1053.379, 'text': "you have a live server command, but you can also click right here where it says go live and that's going to open up 5500 in your browser.", 'start': 1046.454, 'duration': 6.925}, {'end': 1057.562, 'text': 'you can just close that and then you just need to start up the php server.', 'start': 1053.379, 'duration': 4.183}, {'end': 1061.864, 'text': 'so right here, right click php serve project that opens on 3000.', 'start': 1057.562, 'duration': 4.302}, {'end': 1065.146, 'text': 'you can close that up and now we should.', 'start': 1061.864, 'duration': 3.282}, {'end': 1069.889, 'text': 'i think we have to give this one reload and then i should be able to just save.', 'start': 1065.146, 'duration': 4.743}, {'end': 1070.549, 'text': 'and there we go.', 'start': 1069.889, 'duration': 0.66}, {'end': 1076.739, 'text': 'so now I can put anything in here, save and now I have auto reload with my PHP files.', 'start': 1070.549, 'duration': 6.19}, {'end': 1077.701, 'text': 'All right.', 'start': 1077.42, 'duration': 0.281}, {'end': 1081.828, 'text': 'Now, if you guys want, you can, like I said before, you can get the starter files.', 'start': 1077.781, 'duration': 4.047}, {'end': 1090.312, 'text': "so if we go right here, starter files these are all the files i'll be creating and they're pretty much empty, aside from some comments.", 'start': 1082.728, 'duration': 7.584}, {'end': 1096.855, 'text': "so if you want to either clone the repository or if you're not that familiar with git, you can just go to download the zip.", 'start': 1090.312, 'duration': 6.543}, {'end': 1101.117, 'text': "you can get those if you want, but i'm just going to create them as we go along.", 'start': 1096.855, 'duration': 4.262}, {'end': 1108.942, 'text': "so i'm just going to rename this index.php to 01 underscore output dot php.", 'start': 1101.117, 'duration': 7.825}, {'end': 1112.407, 'text': "and now this is going to break because there's no longer an index.", 'start': 1108.942, 'duration': 3.465}, {'end': 1115.971, 'text': "so i'm going to go to localhost php.", 'start': 1112.407, 'duration': 3.564}, {'end': 1117.112, 'text': 'crash slash.', 'start': 1115.971, 'duration': 1.141}, {'end': 1119.375, 'text': '01 output.php.', 'start': 1117.112, 'duration': 2.263}, {'end': 1130.165, 'text': "all right, i'm actually going to make this just a little bit smaller, OK, so let's go ahead and I'm just going to close a sidebar up for now.", 'start': 1119.375, 'duration': 10.79}, {'end': 1136.95, 'text': 'So we have our opening PHP tag and we are just echoing out a string into the browser here.', 'start': 1130.765, 'duration': 6.185}, {'end': 1138.571, 'text': 'We have our closing PHP tag.', 'start': 1136.97, 'duration': 1.601}, {'end': 1145.497, 'text': 'Now, before we get into the different output constructs and functions, I just want to talk about the tag.', 'start': 1139.172, 'duration': 6.325}, {'end': 1147.398, 'text': 'So you always need the opening tag.', 'start': 1145.577, 'duration': 1.821}, {'end': 1149.32, 'text': 'The closing one is actually optional.', 'start': 1147.458, 'duration': 1.862}, {'end': 1151.802, 'text': 'unless you have something below it.', 'start': 1150.06, 'duration': 1.742}, {'end': 1154.545, 'text': "So if I go ahead and save that, that's absolutely fine.", 'start': 1151.842, 'duration': 2.703}, {'end': 1159.49, 'text': 'And usually developers will omit the ending tag unless they need it.', 'start': 1154.765, 'duration': 4.725}, {'end': 1165.196, 'text': "Now, where you do need it is if you're going to have some HTML down here, something like this,", 'start': 1159.59, 'duration': 5.606}, {'end': 1170.821, 'text': "because a lot of times you'll have your HTML output and then you'll have your PHP logic Up at the top.", 'start': 1165.196, 'duration': 5.625}, {'end': 1176.806, 'text': 'you might fetch something from the database here and then output it down here, because you can, you can.', 'start': 1170.821, 'duration': 5.985}], 'summary': 'Xampp is recommended for beginners to set up on windows or mac, while docker and containers can be explored later for advanced users.', 'duration': 22.732, 'max_score': 691.484, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU691484.jpg'}, {'end': 1005.705, 'src': 'embed', 'start': 973.804, 'weight': 7, 'content': [{'end': 976.047, 'text': 'so first would be to install that.', 'start': 973.804, 'duration': 2.243}, {'end': 983.234, 'text': 'then we also need the php server extension, which is this right here, so you would install that as well.', 'start': 976.047, 'duration': 7.187}, {'end': 986.238, 'text': 'and then we also need the php intellifence.', 'start': 983.234, 'duration': 3.004}, {'end': 990.52, 'text': 'Yeah, this right here IntelliFence extension.', 'start': 988.239, 'duration': 2.281}, {'end': 992.02, 'text': 'So you want to get those installed.', 'start': 990.56, 'duration': 1.46}, {'end': 998.583, 'text': 'And then you also need to have the live server extension, Chrome or Firefox extension.', 'start': 992.701, 'duration': 5.882}, {'end': 1005.705, 'text': "So if you search for live server, I'm on Chrome, so that's obviously what I would get.", 'start': 999.123, 'duration': 6.582}], 'summary': 'Install php server extension, intellifence, and live server extension for chrome or firefox.', 'duration': 31.901, 'max_score': 973.804, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU973804.jpg'}], 'start': 100.354, 'title': 'Php for web development', 'summary': 'Introduces php as a server-side scripting language for web development, emphasizing its practicality, interpretation, and use in combination with relational databases. it also discusses the misconceptions about php, its practical use in freelancing and small businesses, and highlights the significance of learning php for building wordpress and laravel, as well as covering the setup process, recommending xampp for beginners, and detailing the steps for setting up xampp for php development.', 'chapters': [{'end': 355.285, 'start': 100.354, 'title': 'Introduction to php for web development', 'summary': 'Introduces php as a server-side scripting language for web development, emphasizing its practicality, interpretation, and use in combination with relational databases. it also discusses the setup process, recommending xampp for beginners and highlighting the flexibility in choosing the development platform.', 'duration': 254.931, 'highlights': ['PHP is a server-side scripting language for web development. PHP is specifically designed for web development, emphasizing its primary use case and relevance to the audience.', 'PHP is interpreted and can be written alongside HTML using PHP tags. Emphasizes the practicality of PHP and its ability to integrate with HTML, highlighting its convenience for web development.', 'XAMPP is recommended for beginners as it includes PHP, Apache, and MySQL in one installation. Provides a clear recommendation for beginners, highlighting the convenience and completeness of XAMPP for setting up a PHP development environment.', 'Flexibility in choosing the development platform, such as using Mac or Windows, is emphasized. Highlights the flexibility for beginners in choosing the development platform, debunking the misconception that Linux is mandatory for PHP development.']}, {'end': 561.586, 'start': 355.285, 'title': 'Benefits of learning php: wordpress and laravel', 'summary': 'Discusses the misconceptions about php, its practical use in freelancing and small businesses, and highlights the significance of learning php for building wordpress and laravel, emphasizing practicality, development speed, and versatility.', 'duration': 206.301, 'highlights': ['PHP is often criticized out of ignorance or by individuals who have not kept up with its advancements, such as its evolution to version 8 and significant improvements.', 'WordPress, built on PHP, is popular for its practicality and development speed, making it an ideal choice for small businesses and freelancers.', 'Laravel, a powerful PHP framework, is recommended for larger and more customized projects, showcasing the importance of PHP in modern web development.']}, {'end': 1220.222, 'start': 561.646, 'title': 'Setting up xampp for php development', 'summary': 'Covers setting up xampp for php development, including installing xampp, configuring php and mysql, creating and running php files, and setting up auto-reload for development, with details on recommended extensions and file structure.', 'duration': 658.576, 'highlights': ['XAMPP provides Apache web server, PHP, and MySQL, along with PHP My Admin for database management. XAMPP includes an Apache web server, PHP, MySQL, and PHP My Admin, providing all necessary tools for PHP development.', 'Detailed guidance on installing and configuring XAMPP and its services for Windows and Mac users. The tutorial provides detailed instructions for installing and configuring XAMPP services for both Windows and Mac users.', "Instructions on creating and running PHP files within the server's document root directory. The tutorial guides users on creating and running PHP files within the server's document root directory, specifying the file structure and file naming conventions.", 'Recommendations for extensions such as live server, PHP server, and PHP IntelliFence for auto-reloading functionality. The tutorial recommends installing extensions like live server, PHP server, and PHP IntelliFence for auto-reloading functionality and provides instructions on setting them up.']}], 'duration': 1119.868, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU100354.jpg', 'highlights': ['PHP is a server-side scripting language for web development.', 'XAMPP is recommended for beginners as it includes PHP, Apache, and MySQL in one installation.', 'WordPress, built on PHP, is popular for its practicality and development speed.', 'Laravel, a powerful PHP framework, is recommended for larger and more customized projects.', 'XAMPP includes an Apache web server, PHP, MySQL, and PHP My Admin, providing all necessary tools for PHP development.', 'Detailed guidance on installing and configuring XAMPP and its services for Windows and Mac users.', "Instructions on creating and running PHP files within the server's document root directory.", 'Recommendations for extensions such as live server, PHP server, and PHP IntelliFence for auto-reloading functionality.', 'PHP is interpreted and can be written alongside HTML using PHP tags.', 'Flexibility in choosing the development platform, such as using Mac or Windows, is emphasized.', 'PHP is often criticized out of ignorance or by individuals who have not kept up with its advancements, such as its evolution to version 8 and significant improvements.']}, {'end': 1933.612, 'segs': [{'end': 1270.916, 'src': 'embed', 'start': 1220.643, 'weight': 0, 'content': [{'end': 1223.645, 'text': "If you're on Windows, then you go to C drive XAMPP.", 'start': 1220.643, 'duration': 3.002}, {'end': 1227.047, 'text': "Of course, if you're using XAMPP, but you want to go to your ETC.", 'start': 1223.825, 'duration': 3.222}, {'end': 1230.95, 'text': "So ETC, and then there's a php.ini folder.", 'start': 1227.608, 'duration': 3.342}, {'end': 1233.732, 'text': "That's basically your PHP configuration.", 'start': 1230.97, 'duration': 2.762}, {'end': 1238.719, 'text': 'So from here, if you search for display, Underscore errors.', 'start': 1234.133, 'duration': 4.586}, {'end': 1243.112, 'text': 'Not that, but it should be uncommented.', 'start': 1239.301, 'duration': 3.811}, {'end': 1244.015, 'text': 'So this right here.', 'start': 1243.192, 'duration': 0.823}, {'end': 1251.927, 'text': 'if that says off, just turn it to on, save the file, close it and then just, uh, just restart apache right here.', 'start': 1244.423, 'duration': 7.504}, {'end': 1257.609, 'text': 'so just restart, all right, then you should be able to see your errors.', 'start': 1251.927, 'duration': 5.682}, {'end': 1265.293, 'text': 'so, like i said, we can have our html down here for the, for the next few sections or whatever next few files.', 'start': 1257.609, 'duration': 7.684}, {'end': 1267.734, 'text': "we're not really going to be using any html.", 'start': 1265.293, 'duration': 2.441}, {'end': 1270.916, 'text': 'i want to teach you about the php basic syntax.', 'start': 1267.734, 'duration': 3.182}], 'summary': 'Configure php display errors to on in php.ini on xampp for windows', 'duration': 50.273, 'max_score': 1220.643, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1220643.jpg'}, {'end': 1345.629, 'src': 'embed', 'start': 1319.252, 'weight': 5, 'content': [{'end': 1324.685, 'text': 'now, as far as printing things out, i should probably talk about the semicolon.', 'start': 1319.252, 'duration': 5.433}, {'end': 1327.346, 'text': 'you do need semicolons in php.', 'start': 1324.685, 'duration': 2.661}, {'end': 1335.249, 'text': "the only time you don't and i wouldn't recommend doing this is if you don't have it, and then the very next thing is an ending php tag.", 'start': 1327.346, 'duration': 7.903}, {'end': 1337.81, 'text': 'if i save that notice, it still works.', 'start': 1335.249, 'duration': 2.561}, {'end': 1341.031, 'text': "however, if i didn't have this here, it's not going to work.", 'start': 1337.81, 'duration': 3.221}, {'end': 1345.629, 'text': "if i have something under here like that, that's not going to work.", 'start': 1341.031, 'duration': 4.598}], 'summary': 'Semicolons are necessary in php, except before closing php tag, for proper functionality.', 'duration': 26.377, 'max_score': 1319.252, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1319252.jpg'}, {'end': 1394.406, 'src': 'embed', 'start': 1364.501, 'weight': 4, 'content': [{'end': 1366.383, 'text': 'So echo, we just looked at that.', 'start': 1364.501, 'duration': 1.882}, {'end': 1368.024, 'text': 'It can be a string with quotes.', 'start': 1366.403, 'duration': 1.621}, {'end': 1368.845, 'text': 'It can be a number.', 'start': 1368.064, 'duration': 0.781}, {'end': 1370.947, 'text': 'You can also do multiple values.', 'start': 1369.145, 'duration': 1.802}, {'end': 1377.813, 'text': 'So if I wanted to do one, two, three, hello, and then maybe a float, which is a decimal.', 'start': 1371.227, 'duration': 6.586}, {'end': 1381.156, 'text': "So I could do that and it's going to output all of them.", 'start': 1378.493, 'duration': 2.663}, {'end': 1384.899, 'text': 'Now, print is another construct that we can use.', 'start': 1381.676, 'duration': 3.223}, {'end': 1389.683, 'text': "So we don't need parentheses, although you can use parentheses with both echo and print.", 'start': 1385.319, 'duration': 4.364}, {'end': 1394.406, 'text': 'So print is oops, I forgot my semicolon up here.', 'start': 1390.303, 'duration': 4.103}], 'summary': 'The transcript covers the usage of echo and print, including examples of strings, numbers, and multiple values.', 'duration': 29.905, 'max_score': 1364.501, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1364501.jpg'}, {'end': 1661.083, 'src': 'embed', 'start': 1609.26, 'weight': 3, 'content': [{'end': 1613.122, 'text': "but we're also going to talk about data types, which is very important.", 'start': 1609.26, 'duration': 3.862}, {'end': 1615.423, 'text': "so let's go to zero.", 'start': 1613.122, 'duration': 2.301}, {'end': 1619.705, 'text': 'two underscore variables dot php.', 'start': 1615.423, 'duration': 4.282}, {'end': 1627.21, 'text': "so, as far as the data types, i'm just going to grab those real quick and paste those in in my php tag.", 'start': 1619.705, 'duration': 7.505}, {'end': 1629.285, 'text': 'of course, All right.', 'start': 1627.21, 'duration': 2.075}, {'end': 1631.366, 'text': 'So these are the types we have.', 'start': 1629.525, 'duration': 1.841}, {'end': 1636.227, 'text': "If you're if you're familiar with JavaScript, then you probably know the six different types.", 'start': 1631.426, 'duration': 4.801}, {'end': 1638.128, 'text': "PHP isn't much different.", 'start': 1636.367, 'duration': 1.761}, {'end': 1639.788, 'text': 'Just line this up.', 'start': 1638.728, 'duration': 1.06}, {'end': 1640.629, 'text': "It's going to bother me.", 'start': 1639.848, 'duration': 0.781}, {'end': 1647.451, 'text': 'So we have strings, which are a series of characters surrounded by quotes, and it can be single quotes or double quotes.', 'start': 1641.269, 'duration': 6.182}, {'end': 1653.453, 'text': 'And it could be anything within those quotes, letters, numbers, symbols, whatever.', 'start': 1648.151, 'duration': 5.302}, {'end': 1658.78, 'text': 'Integers are another type or ints, which are whole numbers, positive or negative.', 'start': 1654.233, 'duration': 4.547}, {'end': 1661.083, 'text': 'Floats are decimal numbers.', 'start': 1659.4, 'duration': 1.683}], 'summary': 'Discussion on php data types: strings, integers, and floats', 'duration': 51.823, 'max_score': 1609.26, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1609260.jpg'}, {'end': 1708.288, 'src': 'embed', 'start': 1683.639, 'weight': 7, 'content': [{'end': 1689.641, 'text': "as far as the rules go for naming variables, i'm just going to look at those real quick.", 'start': 1683.639, 'duration': 6.002}, {'end': 1692.022, 'text': 'so they must be prefixed with a number sign.', 'start': 1689.641, 'duration': 2.381}, {'end': 1701.863, 'text': 'And this, I think, is one of the reasons that some people say PHP is an ugly language because of these damn dollar signs.', 'start': 1693.055, 'duration': 8.808}, {'end': 1705.266, 'text': 'But unfortunately, we have to use them for creating variables.', 'start': 1702.023, 'duration': 3.243}, {'end': 1708.288, 'text': 'They must start with a letter or an underscore.', 'start': 1705.666, 'duration': 2.622}], 'summary': 'Php variable names must start with a number sign, letter, or underscore.', 'duration': 24.649, 'max_score': 1683.639, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1683639.jpg'}], 'start': 1220.643, 'title': 'Php configuration and data types in xampp', 'summary': 'Explains modifying php configuration in xampp on windows to enable error display and covers php comments, printing, and data types, including multiple line comments, echo and print constructs, and six different data types.', 'chapters': [{'end': 1270.916, 'start': 1220.643, 'title': 'Php configuration on windows', 'summary': "Explains how to modify the php configuration in xampp on windows, enabling the display of errors by changing the 'display_errors' setting from 'off' to 'on' in the 'php.ini' file, followed by restarting apache.", 'duration': 50.273, 'highlights': ["The 'php.ini' file in the ETC folder contains the PHP configuration settings, including the 'display_errors' setting.", "To display errors, the 'display_errors' setting in the 'php.ini' file should be changed from 'off' to 'on'.", "After saving the 'php.ini' file, Apache needs to be restarted to apply the changes."]}, {'end': 1933.612, 'start': 1270.916, 'title': 'Php comments, printing, and data types', 'summary': 'Covers php comments, printing, and data types, including single and multiple line comments, the use of semicolons in php, echo and print constructs, var_dump, var_export, and the six different data types in php.', 'duration': 662.696, 'highlights': ['The chapter covers PHP comments, printing, and data types It discusses single and multiple line comments, the use of semicolons in PHP, echo and print constructs, var_dump, var_export, and the six different data types in PHP.', 'Echo can output multiple values Echo can output multiple values including strings, numbers, and floats all at once.', "The use of semicolons in PHP Semicolons are necessary in PHP, except when it's followed by an ending PHP tag. Omitting semicolons may lead to errors.", 'The different data types in PHP The six different data types in PHP are strings, integers, floats, boolean, arrays, objects, null, and resource.', 'The rules for naming variables in PHP Variables must be prefixed with a dollar sign, start with a letter or underscore, can only contain alphanumeric characters and underscores, and are case sensitive.']}], 'duration': 712.969, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1220643.jpg', 'highlights': ["The 'php.ini' file in the ETC folder contains the PHP configuration settings, including the 'display_errors' setting.", "To display errors, the 'display_errors' setting in the 'php.ini' file should be changed from 'off' to 'on'.", "After saving the 'php.ini' file, Apache needs to be restarted to apply the changes.", 'The chapter covers PHP comments, printing, and data types It discusses single and multiple line comments, the use of semicolons in PHP, echo and print constructs, var_dump, var_export, and the six different data types in PHP.', 'Echo can output multiple values Echo can output multiple values including strings, numbers, and floats all at once.', "The use of semicolons in PHP Semicolons are necessary in PHP, except when it's followed by an ending PHP tag. Omitting semicolons may lead to errors.", 'The different data types in PHP The six different data types in PHP are strings, integers, floats, boolean, arrays, objects, null, and resource.', 'The rules for naming variables in PHP Variables must be prefixed with a dollar sign, start with a letter or underscore, can only contain alphanumeric characters and underscores, and are case sensitive.']}, {'end': 2514.933, 'segs': [{'end': 1962.796, 'src': 'embed', 'start': 1934.073, 'weight': 8, 'content': [{'end': 1937.976, 'text': 'OK, so if you have double quotes, you can just put the variable right in.', 'start': 1934.073, 'duration': 3.903}, {'end': 1944.101, 'text': 'But I would recommend using this style so you can have curly braces like this.', 'start': 1938.096, 'duration': 6.005}, {'end': 1948.045, 'text': 'And this is just like what you would do with a JavaScript JavaScript literal.', 'start': 1944.161, 'duration': 3.884}, {'end': 1949.846, 'text': 'So that works as well.', 'start': 1948.625, 'duration': 1.221}, {'end': 1954.891, 'text': 'So I would recommend this just because it shows that the variable name is, you know, sticking out.', 'start': 1949.926, 'duration': 4.965}, {'end': 1956.475, 'text': 'All right.', 'start': 1956.175, 'duration': 0.3}, {'end': 1962.796, 'text': "And then let's see, as far as like arithmetic, we can say five, we'll say echo five plus five.", 'start': 1956.655, 'duration': 6.141}], 'summary': 'Recommend using curly braces for variables in javascript javascript literals for clarity and readability.', 'duration': 28.723, 'max_score': 1934.073, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1934073.jpg'}, {'end': 2031.783, 'src': 'embed', 'start': 2009.97, 'weight': 6, 'content': [{'end': 2019.161, 'text': "so if i say 10, modulus 3, that's going to give me 1, because it's giving me the remainder of 3 into 10..", 'start': 2009.97, 'duration': 9.191}, {'end': 2019.441, 'text': 'All right.', 'start': 2019.161, 'duration': 0.28}, {'end': 2022.822, 'text': 'And then the last thing I want to show you here are constants.', 'start': 2019.601, 'duration': 3.221}, {'end': 2028.763, 'text': "Now, constants are you only want to use these if you know for a fact that they're never going to change.", 'start': 2023.602, 'duration': 5.161}, {'end': 2031.783, 'text': 'So I use them for things like database credentials.', 'start': 2028.883, 'duration': 2.9}], 'summary': 'Using modulus to find remainders and constants for unchanging values like database credentials.', 'duration': 21.813, 'max_score': 2009.97, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2009970.jpg'}, {'end': 2111.213, 'src': 'embed', 'start': 2083.719, 'weight': 0, 'content': [{'end': 2088.681, 'text': "So I'm going to go to zero three underscore arrays dot PHP.", 'start': 2083.719, 'duration': 4.962}, {'end': 2095.784, 'text': 'OK, so arrays are data types or data structures that hold multiple values.', 'start': 2089.679, 'duration': 6.105}, {'end': 2097.605, 'text': "And there's different types of arrays.", 'start': 2096.103, 'duration': 1.502}, {'end': 2099.146, 'text': "Let's just say simple array.", 'start': 2097.645, 'duration': 1.501}, {'end': 2101.788, 'text': "And there's two different ways to create them.", 'start': 2099.166, 'duration': 2.622}, {'end': 2104.691, 'text': "So the first one, let's just create a variable called numbers.", 'start': 2101.868, 'duration': 2.823}, {'end': 2111.213, 'text': "And I'm just going to set an array of numbers and we can do that with just the square brackets.", 'start': 2105.351, 'duration': 5.862}], 'summary': 'Arrays are data structures that hold multiple values, created using square brackets.', 'duration': 27.494, 'max_score': 2083.719, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2083719.jpg'}, {'end': 2189.987, 'src': 'embed', 'start': 2157.273, 'weight': 3, 'content': [{'end': 2159.594, 'text': 'Now, this shows us a little more information.', 'start': 2157.273, 'duration': 2.321}, {'end': 2166.357, 'text': 'It shows us the data type, the length of values in the array, and it shows us the values, which are 1, 44, 55, 22.', 'start': 2159.654, 'duration': 6.703}, {'end': 2167.978, 'text': 'And then it also shows us the indexes.', 'start': 2166.357, 'duration': 1.621}, {'end': 2175.874, 'text': 'So each value has an index, so 0, 1, 2, 3.', 'start': 2168.018, 'duration': 7.856}, {'end': 2182.7, 'text': "Now, if we want to print out a specific value, like let's say from this fruits away, we want to print out orange.", 'start': 2175.874, 'duration': 6.826}, {'end': 2189.987, 'text': "So what we would do, we'll say echo and let's say fruits and then square brackets one.", 'start': 2183.121, 'duration': 6.866}], 'summary': "Transcript: shows data type, length, values (1, 44, 55, 22), and indexes. demonstrates accessing specific value like 'orange'.", 'duration': 32.714, 'max_score': 2157.273, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2157273.jpg'}, {'end': 2345.141, 'src': 'embed', 'start': 2316.046, 'weight': 4, 'content': [{'end': 2318.648, 'text': "And let's say we want to get the hex value for blue.", 'start': 2316.046, 'duration': 2.602}, {'end': 2321.39, 'text': 'We would use the blue index like that.', 'start': 2318.668, 'duration': 2.722}, {'end': 2330.156, 'text': "Now, a lot of times you'll use associative arrays for like tabular data, especially when you're working with databases,", 'start': 2323.214, 'duration': 6.942}, {'end': 2333.297, 'text': 'if you have blog posts or users or whatever.', 'start': 2330.156, 'duration': 3.141}, {'end': 2335.818, 'text': "So let's create a variable here.", 'start': 2333.798, 'duration': 2.02}, {'end': 2340.72, 'text': "We'll just call it person and set it to an associative array.", 'start': 2335.858, 'duration': 4.862}, {'end': 2345.141, 'text': "And the index is going to be in this case, we'll do like first name.", 'start': 2340.88, 'duration': 4.261}], 'summary': 'Using associative arrays in php for managing tabular data and database interactions.', 'duration': 29.095, 'max_score': 2316.046, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2316046.jpg'}, {'end': 2401.706, 'src': 'embed', 'start': 2374.894, 'weight': 5, 'content': [{'end': 2380.077, 'text': "So you might see a lot a lot of a lot of stuff like this when you're dealing with databases.", 'start': 2374.894, 'duration': 5.183}, {'end': 2385.219, 'text': "And it's basically like a like a JavaScript object or a Python dictionary.", 'start': 2380.537, 'duration': 4.682}, {'end': 2390.622, 'text': "It's just it's formatted a little different with the fat arrow over the colon.", 'start': 2385.68, 'duration': 4.942}, {'end': 2396.244, 'text': 'And you know, brackets over curly braces, but same idea.', 'start': 2392.003, 'duration': 4.241}, {'end': 2401.706, 'text': 'and then we have multi-dimensional arrays which are basically arrays within arrays.', 'start': 2396.244, 'duration': 5.462}], 'summary': 'Databases use javascript objects or python dictionaries, and multi-dimensional arrays contain arrays within arrays.', 'duration': 26.812, 'max_score': 2374.894, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2374894.jpg'}, {'end': 2495.86, 'src': 'embed', 'start': 2467.415, 'weight': 7, 'content': [{'end': 2475.827, 'text': "So a lot of times when you're working with with APIs and PHP or APIs with anything, a lot of times you're working with JSON data.", 'start': 2467.415, 'duration': 8.412}, {'end': 2477.128, 'text': "That's what you're going to return.", 'start': 2475.867, 'duration': 1.261}, {'end': 2484.116, 'text': 'So we could easily turn this into an array of JSON objects with the JSON and code function.', 'start': 2477.509, 'duration': 6.607}, {'end': 2488.12, 'text': "So let's go ahead and we'll do a var dump here.", 'start': 2484.676, 'duration': 3.444}, {'end': 2492.918, 'text': "Let's say var dump and then JSON underscore encode.", 'start': 2489.155, 'duration': 3.763}, {'end': 2495.86, 'text': "And we'll pass in people.", 'start': 2493.759, 'duration': 2.101}], 'summary': 'Working with apis often involves handling json data in php.', 'duration': 28.445, 'max_score': 2467.415, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2467415.jpg'}], 'start': 1934.073, 'title': 'Php basics and arrays', 'summary': 'Covers php basics including variables, arithmetic operations, constants, and arrays, and discusses arrays in php, covering data types, accessing values and indexes, associative arrays, and multi-dimensional arrays with examples and explanations.', 'chapters': [{'end': 2156.593, 'start': 1934.073, 'title': 'Php basics: variables, arithmetic, constants, and arrays', 'summary': 'Covers php basics including variables, arithmetic operations, constants, and arrays, demonstrating the usage and syntax of each with examples and explanations.', 'duration': 222.52, 'highlights': ['The chapter covers the usage of variables and recommends using curly braces for better clarity and readability. Recommendation to use curly braces for better clarity and readability of variables.', 'Demonstrates arithmetic operations in PHP including addition, subtraction, multiplication, division, and modulus with examples and their results. Demonstrates arithmetic operations in PHP with examples, including results.', 'Explains the usage and importance of constants in PHP, emphasizing their use for values that will never change, such as database credentials. Emphasizes the use of constants for values that will never change, such as database credentials.', 'Provides an introduction to arrays in PHP, explaining the creation of arrays using square brackets and the array function, along with practical examples. Introduction to arrays in PHP, explaining creation using square brackets and array function with practical examples.']}, {'end': 2514.933, 'start': 2157.273, 'title': 'Php arrays and data types', 'summary': 'Discusses arrays in php, covering data types, accessing values and indexes, associative arrays, multi-dimensional arrays, and handling json data using examples and explanations.', 'duration': 357.66, 'highlights': ["The chapter explains the structure of simple arrays, including data type, length of values, and indexes, with an example of accessing specific values like 'orange' using index '1'. Structure of simple arrays, accessing specific values, zero-based indexing", "It details the creation and usage of associative arrays, demonstrating the flexibility of using number indexes or string keys, with examples of accessing values like 'blue' using index '4'. Creation and usage of associative arrays, flexibility in indexing, accessing values", 'The chapter explains the concept of multi-dimensional arrays, showing how to access specific values within nested arrays, with an example of accessing the email value of the second person in a multi-dimensional array. Concept of multi-dimensional arrays, accessing values within nested arrays', "It introduces handling JSON data in PHP, illustrating the conversion of an array to a JSON object using the 'json_encode' function, and the reverse process using 'json_decode'. Handling JSON data, conversion using json_encode and json_decode"]}], 'duration': 580.86, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU1934073.jpg', 'highlights': ['Covers php basics including variables, arithmetic operations, constants, and arrays', 'Introduction to arrays in PHP, explaining creation using square brackets and array function with practical examples', 'Demonstrates arithmetic operations in PHP with examples, including results', "Explains the structure of simple arrays, including data type, length of values, and indexes, with an example of accessing specific values like 'orange' using index '1'", 'Creation and usage of associative arrays, flexibility in indexing, accessing values', 'Concept of multi-dimensional arrays, accessing values within nested arrays', 'Emphasizes the use of constants for values that will never change, such as database credentials', "Introduces handling JSON data in PHP, illustrating the conversion of an array to a JSON object using the 'json_encode' function, and the reverse process using 'json_decode'", 'Recommendation to use curly braces for better clarity and readability of variables']}, {'end': 3165.235, 'segs': [{'end': 2562.602, 'src': 'embed', 'start': 2515.013, 'weight': 1, 'content': [{'end': 2523.338, 'text': "Now, later on, I'm going to go over different array methods so I can show you how to manipulate them and map through them, filter them and so on.", 'start': 2515.013, 'duration': 8.325}, {'end': 2525.499, 'text': "But we're going to get to that a little bit later.", 'start': 2523.718, 'duration': 1.781}, {'end': 2528.06, 'text': 'So the next thing I want to look at are conditionals.', 'start': 2525.959, 'duration': 2.101}, {'end': 2530.562, 'text': "So it's a zero four and.", 'start': 2528.441, 'duration': 2.121}, {'end': 2537.829, 'text': 'Conditionals.php Conditionals are control structures, whatever you want to call them.', 'start': 2532.306, 'duration': 5.523}, {'end': 2546.534, 'text': "And let's change this here to 04 underscore conditionals.php.", 'start': 2538.73, 'duration': 7.804}, {'end': 2548.875, 'text': 'All right.', 'start': 2548.655, 'duration': 0.22}, {'end': 2549.595, 'text': 'Close that up.', 'start': 2548.955, 'duration': 0.64}, {'end': 2557.359, 'text': "So, before we get into if statements, which are the first type of conditional or control structure that we're going to look at,", 'start': 2550.316, 'duration': 7.043}, {'end': 2559.881, 'text': 'I just want to take a look at the operators that we have.', 'start': 2557.359, 'duration': 2.522}, {'end': 2562.602, 'text': 'So these are used for comparison.', 'start': 2560.341, 'duration': 2.261}], 'summary': 'The transcript covers array methods, conditionals, and operators in programming.', 'duration': 47.589, 'max_score': 2515.013, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2515013.jpg'}, {'end': 2609.937, 'src': 'embed', 'start': 2584.248, 'weight': 0, 'content': [{'end': 2591.73, 'text': "All right now, if statements are the first type of conditional we're gonna look at, and if we look at the syntax here,", 'start': 2584.248, 'duration': 7.482}, {'end': 2598.731, 'text': 'basically we just say if we pass in a condition and then we have the code to be executed, if that condition is true,', 'start': 2591.73, 'duration': 7.001}, {'end': 2602.933, 'text': "So let's just do something really simple to start with.", 'start': 2599.511, 'duration': 3.422}, {'end': 2609.937, 'text': "So we'll set an age variable and set it to 20 and then we're going to do an if statement with a condition.", 'start': 2603.013, 'duration': 6.924}], 'summary': 'Introduction to if statements in programming, using age as an example.', 'duration': 25.689, 'max_score': 2584.248, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2584248.jpg'}, {'end': 2686.638, 'src': 'embed', 'start': 2660.901, 'weight': 5, 'content': [{'end': 2667.245, 'text': "And I'm actually going to set a variable to the PHP date function, which will format a date and time.", 'start': 2660.901, 'duration': 6.344}, {'end': 2676.211, 'text': 'And you can pass in different arguments to get like if you want the month name or the hour or the day of the month.', 'start': 2668.986, 'duration': 7.225}, {'end': 2677.952, 'text': "there's different arguments to pass in.", 'start': 2676.211, 'duration': 1.741}, {'end': 2682.515, 'text': 'You can see it here within VS Code or in the PHP docs.', 'start': 2678.012, 'duration': 4.503}, {'end': 2686.638, 'text': "So for instance, if I want the day of the month, it's uppercase F.", 'start': 2683.256, 'duration': 3.382}], 'summary': 'Setting a variable to the php date function to format date and time with different arguments.', 'duration': 25.737, 'max_score': 2660.901, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2660901.jpg'}, {'end': 2858.749, 'src': 'embed', 'start': 2827.034, 'weight': 6, 'content': [{'end': 2828.916, 'text': 'So let me just comment this a lot.', 'start': 2827.034, 'duration': 1.882}, {'end': 2834.479, 'text': "In a lot of cases, we're going to be dealing with databases and you'll have arrays of data.", 'start': 2829.236, 'duration': 5.243}, {'end': 2839.403, 'text': "So let's say we have a post array with we'll just put first post in here.", 'start': 2834.9, 'duration': 4.503}, {'end': 2847.365, 'text': "And I might want to check to see if that if there's anything in that posts array and there's a few ways to do that.", 'start': 2841.043, 'duration': 6.322}, {'end': 2849.126, 'text': 'One is the empty function.', 'start': 2847.825, 'duration': 1.301}, {'end': 2854.648, 'text': "So if I say if empty posts, then it's going to check to see if it is empty.", 'start': 2849.506, 'duration': 5.142}, {'end': 2858.749, 'text': "If I save that, it's not going to echo out one, two, three, because it's not empty.", 'start': 2854.688, 'duration': 4.061}], 'summary': 'Utilize empty function to check if posts array is empty in php.', 'duration': 31.715, 'max_score': 2827.034, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2827034.jpg'}, {'end': 3025.372, 'src': 'embed', 'start': 2994.933, 'weight': 8, 'content': [{'end': 3002.378, 'text': "But we can also use what's called the coalescing operator, which I believe was added in PHP 7.5.", 'start': 2994.933, 'duration': 7.445}, {'end': 3005.34, 'text': 'four, seven, point, three, four, something like that.', 'start': 3002.378, 'duration': 2.962}, {'end': 3009.042, 'text': "so that's actually just double question mark.", 'start': 3005.34, 'duration': 3.702}, {'end': 3014.105, 'text': "so let's say uh, first post, and i'm going to say equal to now.", 'start': 3009.042, 'duration': 5.063}, {'end': 3017.767, 'text': "in this case we don't have to use the not empty.", 'start': 3014.105, 'duration': 3.662}, {'end': 3025.372, 'text': 'so we can just say post zero and then the coalescing operator and then null.', 'start': 3017.767, 'duration': 7.605}], 'summary': 'The coalescing operator was added in php 7.5, enabling simpler handling of null values.', 'duration': 30.439, 'max_score': 2994.933, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2994933.jpg'}], 'start': 2515.013, 'title': 'Javascript and php conditional statements', 'summary': 'Covers javascript conditionals, if statements, and comparison operators, demonstrating their usage with different conditions and variable values. it also explains php conditional statements, including if-else, ternary operators, empty function, and switches, with practical examples for optimizing code readability and efficiency.', 'chapters': [{'end': 2660.621, 'start': 2515.013, 'title': 'Javascript conditionals and if statements', 'summary': 'Covers javascript conditionals and if statements, including an explanation of comparison operators and examples of if statements, if else statements, and else if statements, with a demonstration of how they work with different conditions and variable values.', 'duration': 145.608, 'highlights': ['The chapter covers JavaScript conditionals and if statements The chapter focuses on JavaScript conditionals and if statements as the primary topic of discussion.', 'including an explanation of comparison operators The chapter includes an explanation of comparison operators used for evaluating conditions, such as less than, greater than, equal to, identical to, not equal to, and not identical to.', 'examples of if statements, if else statements, and else if statements The chapter provides examples of if statements, if else statements, and else if statements to illustrate different conditions and outcomes based on the evaluated conditions.', 'demonstration of how they work with different conditions and variable values The chapter demonstrates how if statements, if else statements, and else if statements work with various conditions and variable values, showing the resulting actions based on the evaluated conditions.']}, {'end': 3165.235, 'start': 2660.901, 'title': 'Php conditional statements', 'summary': 'Covers the usage of php conditional statements, such as if-else, ternary operators, empty function, and switches, demonstrating their syntax and practical application with examples, including formatting date and time, checking array emptiness, and using coalescing operators, with a focus on optimizing code readability and efficiency.', 'duration': 504.334, 'highlights': ['Demonstrated the usage of PHP conditional statements like if-else, else if, and switches with practical examples. Usage of PHP conditional statements with practical examples.', 'Explained the formatting of date and time using PHP date function with different arguments, such as uppercase H for hour and uppercase F for the month name. Formatting date and time using PHP date function with different arguments.', 'Illustrated the usage of empty function to check for array emptiness and demonstrated the practical application with examples. Practical application of empty function to check array emptiness.', 'Introduced the usage of ternary operators as a concise alternative to if-else statements, emphasizing its efficiency in reducing code lines. Introduction of ternary operators as a concise alternative to if-else statements.', 'Explained the coalescing operator as an alternative to the ternary operator to provide default values for variables when an expression is null. Explanation of coalescing operator as an alternative to the ternary operator.']}], 'duration': 650.222, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU2515013.jpg', 'highlights': ['The chapter covers JavaScript conditionals and if statements as the primary topic of discussion.', 'The chapter includes an explanation of comparison operators used for evaluating conditions.', 'The chapter provides examples of if statements, if else statements, and else if statements to illustrate different conditions and outcomes.', 'The chapter demonstrates how if statements, if else statements, and else if statements work with various conditions and variable values.', 'Usage of PHP conditional statements with practical examples.', 'Formatting date and time using PHP date function with different arguments.', 'Practical application of empty function to check array emptiness.', 'Introduction of ternary operators as a concise alternative to if-else statements.', 'Explanation of coalescing operator as an alternative to the ternary operator.']}, {'end': 3702.521, 'segs': [{'end': 3221.729, 'src': 'embed', 'start': 3198.433, 'weight': 0, 'content': [{'end': 3209.202, 'text': "So loops are basically used to execute a piece of code while a specific condition is met and it'll keep executing that code until it's no longer met.", 'start': 3198.433, 'duration': 10.769}, {'end': 3211.064, 'text': "And there's a few different types of loops.", 'start': 3209.262, 'duration': 1.802}, {'end': 3214.167, 'text': "So the first one we're going to look at is a for loop.", 'start': 3211.444, 'duration': 2.723}, {'end': 3218.768, 'text': 'So if we look at the syntax here, we say four and we pass in three things.', 'start': 3214.767, 'duration': 4.001}, {'end': 3220.309, 'text': 'We pass an initializer.', 'start': 3218.808, 'duration': 1.501}, {'end': 3221.729, 'text': 'So we set a variable.', 'start': 3220.629, 'duration': 1.1}], 'summary': 'Loops execute code while condition is met. different types include for loop.', 'duration': 23.296, 'max_score': 3198.433, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU3198433.jpg'}, {'end': 3353.852, 'src': 'embed', 'start': 3318.103, 'weight': 1, 'content': [{'end': 3321.178, 'text': 'Now I get number zero through 10.', 'start': 3318.103, 'duration': 3.075}, {'end': 3321.438, 'text': 'All right.', 'start': 3321.178, 'duration': 0.26}, {'end': 3322.359, 'text': "So that's a for loop.", 'start': 3321.458, 'duration': 0.901}, {'end': 3324.841, 'text': 'The next one is a while loop.', 'start': 3322.98, 'duration': 1.861}, {'end': 3327.304, 'text': "So it's copy and not copy.", 'start': 3325.202, 'duration': 2.102}, {'end': 3328.585, 'text': "It's comment that out.", 'start': 3327.384, 'duration': 1.201}, {'end': 3331.007, 'text': 'And the while loop is pretty simple.', 'start': 3329.366, 'duration': 1.641}, {'end': 3333.149, 'text': 'We just say while and then we have a condition.', 'start': 3331.047, 'duration': 2.102}, {'end': 3336.772, 'text': 'And as long as that condition is met, the code will be executed.', 'start': 3333.269, 'duration': 3.503}, {'end': 3344.219, 'text': "So let's take or let's create a variable of X, set it to one, and then we're going to say while.", 'start': 3337.353, 'duration': 6.866}, {'end': 3353.852, 'text': "And for the condition, we'll say while x is less than or equal to, let's say, 15, then we're just going to echo out the same thing.", 'start': 3345.22, 'duration': 8.632}], 'summary': 'The transcript explains for and while loops, with an example of a while loop running until x is less than or equal to 15.', 'duration': 35.749, 'max_score': 3318.103, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU3318103.jpg'}, {'end': 3435.613, 'src': 'embed', 'start': 3409.185, 'weight': 2, 'content': [{'end': 3417.547, 'text': 'but basically we say do and then we have a block of code and then we have the while at the end with the condition.', 'start': 3409.185, 'duration': 8.362}, {'end': 3423.768, 'text': 'Now, the big difference between this and a while loop is this code here is always going to be executed.', 'start': 3417.607, 'duration': 6.161}, {'end': 3431.61, 'text': "Even if this this doesn't match, it'll always run because it runs before we actually check the condition.", 'start': 3423.948, 'duration': 7.662}, {'end': 3435.613, 'text': "So, for example, let's see, we have the X.", 'start': 3432.29, 'duration': 3.323}], 'summary': 'Demonstrates the difference between while loop and do-while loop in code execution.', 'duration': 26.428, 'max_score': 3409.185, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU3409185.jpg'}, {'end': 3544.212, 'src': 'embed', 'start': 3490.283, 'weight': 4, 'content': [{'end': 3496.505, 'text': 'So if I save it, it still is going to run once because this is executed before the while loop.', 'start': 3490.283, 'duration': 6.222}, {'end': 3497.405, 'text': 'All right.', 'start': 3497.185, 'duration': 0.22}, {'end': 3503.187, 'text': "And there might be certain situations where you need that functionality, but I honestly haven't run into it much.", 'start': 3497.425, 'duration': 5.762}, {'end': 3510.02, 'text': "All right, so that's a do while now the next one is a for each, which is specific.", 'start': 3504.377, 'duration': 5.643}, {'end': 3513.462, 'text': 'Oops, let me just grab it, which is specifically for arrays.', 'start': 3510.06, 'duration': 3.402}, {'end': 3523.609, 'text': "And I would say this is what, in real PHP development, you'll use this more than any of the other ones, because you're constantly dealing with arrays,", 'start': 3514.183, 'duration': 9.426}, {'end': 3526.931, 'text': "whether it's data from a database or from a file or whatever.", 'start': 3523.609, 'duration': 3.322}, {'end': 3532.354, 'text': "So what I'm going to do is add or create an array of, let's say, posts.", 'start': 3527.811, 'duration': 4.543}, {'end': 3535.177, 'text': 'You know, just set it to strings.', 'start': 3533.812, 'duration': 1.365}, {'end': 3538.328, 'text': "We'll say first first post.", 'start': 3535.197, 'duration': 3.131}, {'end': 3544.212, 'text': 'Second post and third post.', 'start': 3540.689, 'duration': 3.523}], 'summary': "The transcript discusses different types of loops in php, with emphasis on the 'for each' loop for handling arrays in real php development.", 'duration': 53.929, 'max_score': 3490.283, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU3490283.jpg'}, {'end': 3620.727, 'src': 'embed', 'start': 3591.694, 'weight': 3, 'content': [{'end': 3596.117, 'text': 'as long as x is less than the entire length of the array.', 'start': 3591.694, 'duration': 4.423}, {'end': 3598.719, 'text': "So it'll stop once it gets to 3 or however long the array is.", 'start': 3596.217, 'duration': 2.502}, {'end': 3602.301, 'text': "And then let's echo here.", 'start': 3600.92, 'duration': 1.381}, {'end': 3612.248, 'text': 'And if we want to echo the value of of each element here, then we would say posts and we would use X as the index.', 'start': 3602.321, 'duration': 9.927}, {'end': 3617.052, 'text': 'OK, so if I save that, we see first post, second post, third post.', 'start': 3613.049, 'duration': 4.003}, {'end': 3618.466, 'text': 'All right.', 'start': 3618.206, 'duration': 0.26}, {'end': 3620.727, 'text': "So that's using a for loop and I'll keep that there.", 'start': 3618.506, 'duration': 2.221}], 'summary': 'Using a for loop to echo array elements based on x index.', 'duration': 29.033, 'max_score': 3591.694, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU3591694.jpg'}], 'start': 3165.235, 'title': 'Php loop types', 'summary': 'Discusses php loops including for, while, and do while loops, emphasizing practical usage and examples of syntax and functionality. it also highlights the practical usage of for each loop for handling arrays in real php development.', 'chapters': [{'end': 3490.203, 'start': 3165.235, 'title': 'Php loops: for, while, and do while', 'summary': 'Introduces php loops, including for, while, and do while loops, with examples of their syntax and functionality, such as executing code while a specific condition is met and incrementing variables to control loop execution.', 'duration': 324.968, 'highlights': ['The for loop syntax includes an initializer, a condition, and an increment, allowing code to execute while the condition is met, demonstrated by iterating from 0 to 10 and customizing the start point of the loop.', 'The while loop is shown to execute code as long as the specified condition is met, with an example of iterating from 1 to 15 and the necessity of including an increment to avoid an infinite loop.', 'The do while loop is explained as always executing its code block at least once, even if the condition is not met, demonstrated by iterating from 1 to 5 and highlighting that the code block is executed before the condition is checked.']}, {'end': 3702.521, 'start': 3490.283, 'title': 'Php loop types and practical usage', 'summary': 'Explains the usage of do-while, for loop, and for each loop in php, with emphasis on the practical usage of for each loop for handling arrays in real php development.', 'duration': 212.238, 'highlights': ['For each loop is the most frequently used loop in PHP for handling arrays in real PHP development. The speaker emphasizes that in real PHP development, the for each loop is used more frequently than other loops due to the constant dealing with arrays, such as data from a database or a file.', 'Usage of for each loop for handling arrays in PHP. The chapter explains the practical usage of the for each loop for handling arrays in PHP, which is commonly encountered in real PHP development scenarios.', 'Demonstration of using for loop to iterate through an array and echo its elements. The speaker demonstrates using a for loop to iterate through an array, checking if x is less than the length of the array and echoing the value of each element using the index.']}], 'duration': 537.286, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU3165235.jpg', 'highlights': ['The for loop syntax includes an initializer, a condition, and an increment, allowing code to execute while the condition is met, demonstrated by iterating from 0 to 10 and customizing the start point of the loop.', 'The while loop is shown to execute code as long as the specified condition is met, with an example of iterating from 1 to 15 and the necessity of including an increment to avoid an infinite loop.', 'The do while loop is explained as always executing its code block at least once, even if the condition is not met, demonstrated by iterating from 1 to 5 and highlighting that the code block is executed before the condition is checked.', 'Demonstration of using for loop to iterate through an array and echo its elements. The speaker demonstrates using a for loop to iterate through an array, checking if x is less than the length of the array and echoing the value of each element using the index.', 'For each loop is the most frequently used loop in PHP for handling arrays in real PHP development. The speaker emphasizes that in real PHP development, the for each loop is used more frequently than other loops due to the constant dealing with arrays, such as data from a database or a file.', 'Usage of for each loop for handling arrays in PHP. The chapter explains the practical usage of the for each loop for handling arrays in PHP, which is commonly encountered in real PHP development scenarios.']}, {'end': 5410.37, 'segs': [{'end': 4028.721, 'src': 'embed', 'start': 4001.988, 'weight': 0, 'content': [{'end': 4006.813, 'text': 'So I could say number and set that to the return value of that sum.', 'start': 4001.988, 'duration': 4.825}, {'end': 4010.576, 'text': 'And now if I echo number, I get 10.', 'start': 4007.033, 'duration': 3.543}, {'end': 4016.441, 'text': "Okay So a lot of times you'll you'll return something from a function.", 'start': 4010.576, 'duration': 5.865}, {'end': 4020.491, 'text': 'Now, we can also have default values.', 'start': 4017.748, 'duration': 2.743}, {'end': 4022.413, 'text': "Actually, I'll just use this sum right here.", 'start': 4020.511, 'duration': 1.902}, {'end': 4028.721, 'text': "So let's say I do want to be able to call sum without passing anything in.", 'start': 4022.473, 'duration': 6.248}], 'summary': "The function 'sum' returns a value of 10 when 'number' is echoed, and default values can be used for the function.", 'duration': 26.733, 'max_score': 4001.988, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU4001988.jpg'}, {'end': 4206.252, 'src': 'embed', 'start': 4178.804, 'weight': 2, 'content': [{'end': 4183.345, 'text': 'So we have anonymous functions, arrow functions, default values.', 'start': 4178.804, 'duration': 4.541}, {'end': 4185.027, 'text': 'We talked about scope.', 'start': 4183.886, 'duration': 1.141}, {'end': 4187.247, 'text': 'So I think that should do it for functions.', 'start': 4185.227, 'duration': 2.02}, {'end': 4190.67, 'text': 'So the next thing I want to do is look at array functions.', 'start': 4187.728, 'duration': 2.942}, {'end': 4201.227, 'text': 'So these are going to be built in PHP functions that that are used for basically working with arrays and array data.', 'start': 4192.759, 'duration': 8.468}, {'end': 4202.508, 'text': "Let's say zero seven.", 'start': 4201.267, 'duration': 1.241}, {'end': 4206.252, 'text': "OK, and then we'll just open that up over here.", 'start': 4202.528, 'duration': 3.724}], 'summary': 'Covered anonymous, arrow functions, default values, and array functions in php.', 'duration': 27.448, 'max_score': 4178.804, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU4178804.jpg'}, {'end': 5059.166, 'src': 'embed', 'start': 5029.611, 'weight': 4, 'content': [{'end': 5032.093, 'text': 'So it was basically zero through 20.', 'start': 5029.611, 'duration': 2.482}, {'end': 5039.781, 'text': "If I change this array to zero through 30, then it'll change the sum to 465.", 'start': 5032.093, 'duration': 7.688}, {'end': 5044.942, 'text': "OK, and there's other functions like this, but I'm like, obviously, I can't go through everything.", 'start': 5039.781, 'duration': 5.161}, {'end': 5052.464, 'text': 'If you look in the repository, this page has the link to the docs where it shows all the array functions.', 'start': 5046.042, 'duration': 6.422}, {'end': 5056.465, 'text': 'If you want to get into some other ones now, we also have string functions.', 'start': 5052.524, 'duration': 3.941}, {'end': 5059.166, 'text': 'So I want to start to look at some of those.', 'start': 5057.025, 'duration': 2.141}], 'summary': 'The array sum changed from 20 to 30, resulting in a sum of 465. additional functions and docs are available in the repository.', 'duration': 29.555, 'max_score': 5029.611, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5029611.jpg'}, {'end': 5184.096, 'src': 'embed', 'start': 5154.713, 'weight': 5, 'content': [{'end': 5160.478, 'text': 'so in this case, if we want to change world to everyone, we can use str, replace,', 'start': 5154.713, 'duration': 5.765}, {'end': 5165.843, 'text': 'pass in what we want to replace and then what we want to replace it with, and then the string.', 'start': 5160.478, 'duration': 5.365}, {'end': 5172.115, 'text': 'OK, if we want to return a portion of a string specified by the offset and length, we can do that.', 'start': 5166.613, 'duration': 5.502}, {'end': 5178.597, 'text': "So in this case, we're getting from the 0 position to 5, which would give us just hello.", 'start': 5172.235, 'duration': 6.362}, {'end': 5184.096, 'text': 'All right, so it would give us from 0, 1, 2, 3, 4, 5.', 'start': 5179.238, 'duration': 4.858}], 'summary': 'Using str.replace to replace words and str.slice to extract a portion of a string.', 'duration': 29.383, 'max_score': 5154.713, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5154713.jpg'}, {'end': 5234.082, 'src': 'embed', 'start': 5203.883, 'weight': 6, 'content': [{'end': 5206.285, 'text': "that gives us a true, which i'm just echoing.", 'start': 5203.883, 'duration': 2.402}, {'end': 5209.148, 'text': 'yes, and then what it ends with.', 'start': 5206.285, 'duration': 2.863}, {'end': 5214.394, 'text': 'you could put world, you could put just ld or d, and those would all be true as well.', 'start': 5209.148, 'duration': 5.246}, {'end': 5226.179, 'text': 'all right now, A couple other important string functions that we can use are HTML entities and HTML special chars, which are very similar.', 'start': 5214.394, 'duration': 11.785}, {'end': 5234.082, 'text': "And they're used for security, really, and they won't parse the HTML.", 'start': 5226.66, 'duration': 7.422}], 'summary': 'Discussed string functions including html entities and special chars for security.', 'duration': 30.199, 'max_score': 5203.883, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5203883.jpg'}, {'end': 5410.37, 'src': 'embed', 'start': 5382.893, 'weight': 7, 'content': [{'end': 5394.878, 'text': "and then I'm going to use a uh specifier of percent D and then, as a second argument, we'll say one plus one, without quotes, which will actually,", 'start': 5382.893, 'duration': 11.985}, {'end': 5396.478, 'text': 'you know, actually do the math.', 'start': 5394.878, 'duration': 1.6}, {'end': 5399.86, 'text': 'So if we save that, we get one plus one equals two.', 'start': 5396.978, 'duration': 2.882}, {'end': 5402.881, 'text': 'So this here is going to replace this.', 'start': 5399.98, 'duration': 2.901}, {'end': 5410.37, 'text': 'And if I wanted that to be a float, I could use the F specifier.', 'start': 5403.928, 'duration': 6.442}], 'summary': 'Using percent d specifier to perform arithmetic, resulting in 1+1=2.', 'duration': 27.477, 'max_score': 5382.893, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5382893.jpg'}], 'start': 3702.521, 'title': 'Php functions, scope, array, and string functions', 'summary': 'Demonstrates creating and using functions in php, explaining scope, passing arguments, and parameters, utilizing array functions for manipulation, and covering array and string functions with practical examples.', 'chapters': [{'end': 4178.684, 'start': 3702.521, 'title': 'Php functions and scope', 'summary': 'Demonstrates how to create and use functions in php, explaining the concept of scope, passing arguments and parameters, returning values, setting default values for arguments, and utilizing anonymous and arrow functions.', 'duration': 476.163, 'highlights': ["The chapter explains the concept of scope in PHP functions, highlighting how variables declared within a function have their own scope, and to use a global variable within a function, 'global' keyword can be used, with 'X value' and 'Y value' as examples.", "It demonstrates passing arguments and parameters in PHP functions, illustrating the difference between the two and how to handle too few arguments error, with 'register user' function as an example.", "The chapter covers returning values from functions, showcasing the usage of 'return' statement to return the sum of two numbers, storing the return value in a variable, and the concept of return values in functions.", "It explains setting default values for function arguments in PHP, showing how to make function arguments optional by setting default values, with 'sum' function having default values for its parameters.", "The chapter introduces anonymous functions in PHP, demonstrating the creation of a function without a name and setting it to a variable, with 'subtract' as an example.", "It also presents the usage of arrow functions in PHP, showing a shorter way of defining a function using the arrow function syntax, with 'multiply' as an example."]}, {'end': 4635.131, 'start': 4178.804, 'title': 'Php array functions', 'summary': 'Covers built-in php array functions, including getting array length, searching for a value, adding/removing elements, chunking arrays, merging arrays, and using the spread operator for array manipulation.', 'duration': 456.327, 'highlights': ['The chapter covers built-in PHP array functions The chapter provides an overview of the various built-in PHP array functions.', 'including getting array length, searching for a value, adding/removing elements The functions count, in_array, array_push, array_pop, array_shift, and unset are discussed for getting array length, searching, adding, and removing elements.', 'chunking arrays, merging arrays, and using the spread operator for array manipulation The methods array_chunk, array_merge, and the spread operator for array manipulation are explained for chunking, merging, and manipulating arrays.']}, {'end': 5107.81, 'start': 4635.151, 'title': 'Php array and string functions', 'summary': 'Covers array functions like combine, keys, flipped, range, map, filter, and reduce with practical examples, and briefly introduces string functions.', 'duration': 472.659, 'highlights': ['Array Functions The chapter covers array functions like combine, keys, flipped, range, map, filter, and reduce with practical examples.', 'String Functions The chapter briefly introduces string functions and demonstrates string length using strlen.']}, {'end': 5410.37, 'start': 5107.81, 'title': 'Php string functions', 'summary': 'Covers various php string functions including strpos, strrev, strtolower, str_replace, substr, startswith, endswith, html special chars, html entities, and printf, demonstrating their usage and importance in web development.', 'duration': 302.56, 'highlights': ['The strpos function is used to find the position of the first occurrence of a substring within a string, returning the index of the first occurrence, such as finding the first occurrence of the letter O at index 4. The strpos function is demonstrated to find the position of the first occurrence of a substring within a string, returning the index of the first occurrence, such as finding the first occurrence of the letter O at index 4.', "The str_replace function is showcased for replacing a substring with another string within a given string, with a practical example of changing 'world' to 'everyone'. The str_replace function is demonstrated for replacing a substring with another string within a given string, with a practical example of changing 'world' to 'everyone'.", 'The HTML special chars and HTML entities functions are explained as important for security in web development, preventing the parsing of HTML, with a practical example of using HTML special chars to prevent JavaScript execution. The importance of HTML special chars and HTML entities functions for security in web development is explained, with a practical example of using HTML special chars to prevent JavaScript execution.', 'The printf function is illustrated for formatting strings with specifiers, allowing dynamic substitution of values into the string, demonstrated with examples of string and numeric substitutions. The printf function is illustrated for formatting strings with specifiers, allowing dynamic substitution of values into the string, demonstrated with examples of string and numeric substitutions.']}], 'duration': 1707.849, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU3702521.jpg', 'highlights': ["The chapter covers returning values from functions, showcasing the usage of 'return' statement to return the sum of two numbers, storing the return value in a variable, and the concept of return values in functions.", "The chapter explains setting default values for function arguments in PHP, showing how to make function arguments optional by setting default values, with 'sum' function having default values for its parameters.", "The chapter introduces anonymous functions in PHP, demonstrating the creation of a function without a name and setting it to a variable, with 'subtract' as an example.", 'The chapter covers built-in PHP array functions The chapter provides an overview of the various built-in PHP array functions.', 'The chapter covers array functions like combine, keys, flipped, range, map, filter, and reduce with practical examples.', "The str_replace function is showcased for replacing a substring with another string within a given string, with a practical example of changing 'world' to 'everyone'.", 'The HTML special chars and HTML entities functions are explained as important for security in web development, preventing the parsing of HTML, with a practical example of using HTML special chars to prevent JavaScript execution.', 'The printf function is illustrated for formatting strings with specifiers, allowing dynamic substitution of values into the string, demonstrated with examples of string and numeric substitutions.']}, {'end': 6287.12, 'segs': [{'end': 5484.818, 'src': 'embed', 'start': 5459.945, 'weight': 2, 'content': [{'end': 5465.733, 'text': "So I'm just going to quickly go over them, but I'm going to have a separate section on most of these so we can see how to work with them.", 'start': 5459.945, 'duration': 5.788}, {'end': 5467.954, 'text': "So they're all going to be arrays.", 'start': 5466.434, 'duration': 1.52}, {'end': 5472.995, 'text': 'The and they all start with this money sign underscore and then all uppercase.', 'start': 5468.334, 'duration': 4.661}, {'end': 5479.177, 'text': 'So the get super global contains information about variables passed through a URL or form.', 'start': 5473.535, 'duration': 5.642}, {'end': 5481.817, 'text': 'So you can actually pass variables in a URL.', 'start': 5479.237, 'duration': 2.58}, {'end': 5484.818, 'text': "And I'm going to show you that in the next video or next section.", 'start': 5481.897, 'duration': 2.921}], 'summary': 'The transcript covers working with arrays and passing variables through a url or form.', 'duration': 24.873, 'max_score': 5459.945, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5459945.jpg'}, {'end': 5531.808, 'src': 'embed', 'start': 5502.39, 'weight': 3, 'content': [{'end': 5506.054, 'text': "If you have session variables, they'll be put in the session super global.", 'start': 5502.39, 'duration': 3.664}, {'end': 5509.59, 'text': 'server contains information about the server environment.', 'start': 5506.667, 'duration': 2.923}, {'end': 5511.511, 'text': "we'll look at that in a second.", 'start': 5509.59, 'duration': 1.921}, {'end': 5514.053, 'text': 'env is environment variables.', 'start': 5511.511, 'duration': 2.542}, {'end': 5519.158, 'text': "files is used when you upload a file, and we're going to go over that soon as well.", 'start': 5514.053, 'duration': 5.105}, {'end': 5526.164, 'text': 'request is used for variables passed through a form or url, so you can use it kind of as a replacement for get and post.', 'start': 5519.158, 'duration': 7.006}, {'end': 5531.808, 'text': "all right, and i know that doesn't explain a lot, but again i'm going to go through most of these in in separate sections.", 'start': 5526.164, 'duration': 5.644}], 'summary': 'Overview of php super global variables and their uses.', 'duration': 29.418, 'max_score': 5502.39, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5502390.jpg'}, {'end': 5970.662, 'src': 'embed', 'start': 5938.981, 'weight': 0, 'content': [{'end': 5939.862, 'text': "you're going to want to.", 'start': 5938.981, 'duration': 0.881}, {'end': 5941.322, 'text': "you're going to want to be a post request.", 'start': 5939.862, 'duration': 1.46}, {'end': 5942.503, 'text': "It's much more secure.", 'start': 5941.383, 'duration': 1.12}, {'end': 5946.286, 'text': 'So what we would do is change this to a post.', 'start': 5943.124, 'duration': 3.162}, {'end': 5951.709, 'text': "The only thing I'd use a get for in a, for a form would probably be like a search.", 'start': 5946.706, 'duration': 5.003}, {'end': 5958.053, 'text': "If you're just searching and you're not actually submitting any data, then that could be a, a get form.", 'start': 5951.889, 'duration': 6.164}, {'end': 5960.519, 'text': "But anything else I'd use post.", 'start': 5959.079, 'duration': 1.44}, {'end': 5970.662, 'text': 'So now all we would have to do to get excuse me to get the data of this form is instead of use get we would use post so underscore posts like that.', 'start': 5961.22, 'duration': 9.442}], 'summary': "Using post requests for form submissions is more secure, unless it's a search.", 'duration': 31.681, 'max_score': 5938.981, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5938981.jpg'}, {'end': 6105.7, 'src': 'heatmap', 'start': 5983.065, 'weight': 0.724, 'content': [{'end': 5986.516, 'text': "Now it's going to show John 30.", 'start': 5983.065, 'duration': 3.451}, {'end': 5986.876, 'text': 'All right.', 'start': 5986.516, 'duration': 0.36}, {'end': 5990.697, 'text': 'And if I reload, those values should still be there.', 'start': 5987.456, 'duration': 3.241}, {'end': 5997.138, 'text': "If I just go to the page, like if I go to the end and just hit enter, then those aren't going to be defined.", 'start': 5991.637, 'duration': 5.501}, {'end': 6004.16, 'text': "So to get around this, if you have a form and you want to use these values and of course, you don't want these errors to show,", 'start': 5997.838, 'duration': 6.322}, {'end': 6007.3, 'text': 'this is where you can use different functions like empty.', 'start': 6004.16, 'duration': 3.14}, {'end': 6010.261, 'text': "A lot of times you'll see the function is set.", 'start': 6007.32, 'duration': 2.941}, {'end': 6012.401, 'text': 'So we can say is set.', 'start': 6010.821, 'duration': 1.58}, {'end': 6019.244, 'text': 'And what we would do for the form is, or what I like to do is to see if the button is set,', 'start': 6013.362, 'duration': 5.882}, {'end': 6023.667, 'text': 'if the submit and we did give it a name so we can access it with post submit.', 'start': 6019.244, 'duration': 4.423}, {'end': 6029.531, 'text': "So let's say if is set post and we want the submit value.", 'start': 6024.188, 'duration': 5.343}, {'end': 6031.293, 'text': 'All right.', 'start': 6029.551, 'duration': 1.742}, {'end': 6036.616, 'text': "So if that is set, then let's take this and let's move this up here.", 'start': 6031.353, 'duration': 5.263}, {'end': 6040.279, 'text': "So that way, when we first come to the page, it doesn't give us an error.", 'start': 6036.696, 'duration': 3.583}, {'end': 6042.63, 'text': 'And then we can set something in here.', 'start': 6041.027, 'duration': 1.603}, {'end': 6046.075, 'text': "We'll say Sarah 25 and submit.", 'start': 6042.67, 'duration': 3.405}, {'end': 6047.637, 'text': "And now it's going to show on the page.", 'start': 6046.195, 'duration': 1.442}, {'end': 6054.147, 'text': "And a lot of times you you'll submit forms and you submit it and they'll go to a database and get stored there and so on.", 'start': 6048.178, 'duration': 5.969}, {'end': 6055.77, 'text': "And we're going to get to that a little later.", 'start': 6054.187, 'duration': 1.583}, {'end': 6063.363, 'text': "Now, since we're getting into forms, I think this is a good time to talk about sanitizing your inputs and talk a little bit about security.", 'start': 6056.158, 'duration': 7.205}, {'end': 6076.293, 'text': "So what I'm going to do here is actually copy all this and then I'm going to create a new file and call it 11 underscore,", 'start': 6063.964, 'duration': 12.329}, {'end': 6079.816, 'text': 'say sanitize underscore inputs dot PHP.', 'start': 6076.293, 'duration': 3.523}, {'end': 6090.272, 'text': "And we'll come over here and let's go to 11 underscore sanitize inputs.", 'start': 6082.529, 'duration': 7.743}, {'end': 6092.693, 'text': "Okay, so we'll paste that in.", 'start': 6091.432, 'duration': 1.261}, {'end': 6095.974, 'text': "So we have the same exact thing, but I'm just going to get rid of the link here.", 'start': 6092.713, 'duration': 3.261}, {'end': 6096.734, 'text': "We don't need that.", 'start': 6096.014, 'duration': 0.72}, {'end': 6105.7, 'text': "And, as I showed you earlier, if we put a script in here and submit, since I'm echoing out,", 'start': 6098.058, 'duration': 7.642}], 'summary': 'Demonstrates using php functions like is_set and empty for form validation and processing user inputs.', 'duration': 122.635, 'max_score': 5983.065, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5983065.jpg'}, {'end': 6196.175, 'src': 'embed', 'start': 6166.71, 'weight': 1, 'content': [{'end': 6172.432, 'text': 'and then also, when you have your action down here, the php self, this could be vulnerable as well.', 'start': 6166.71, 'duration': 5.722}, {'end': 6178.855, 'text': "so a lot of times, you'll see, you'll, uh, surround that with html special chars.", 'start': 6172.432, 'duration': 6.423}, {'end': 6180.056, 'text': "so it doesn't hurt to do that.", 'start': 6178.855, 'duration': 1.201}, {'end': 6182.932, 'text': "Now there's other ways to do this as well.", 'start': 6181.212, 'duration': 1.72}, {'end': 6189.173, 'text': "I like to use the filter input function, so I'm going to replace this with filter.", 'start': 6183.192, 'duration': 5.981}, {'end': 6196.175, 'text': "It's a filter input, and then I'm going to pass in here input underscore post.", 'start': 6189.193, 'duration': 6.982}], 'summary': 'Use filter_input instead of vulnerable php self for security.', 'duration': 29.465, 'max_score': 6166.71, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU6166710.jpg'}], 'start': 5410.41, 'title': 'Php super globals', 'summary': 'Covers the concept of superglobals in php, explaining their usage, with examples including get and post superglobals, input sanitization, and security measures. it emphasizes the importance of using post for secure data submission and protection against potential vulnerabilities.', 'chapters': [{'end': 5640.23, 'start': 5410.41, 'title': 'Working with superglobals', 'summary': 'Covers the concept of superglobals in php, explaining that they are built-in variables used for various purposes and always available in all scopes, with examples including the get superglobal for variables passed through a url or form, and the server superglobal containing server environment information.', 'duration': 229.82, 'highlights': ['Superglobals are built-in variables always available in all scopes for various purposes. Superglobals are built-in variables that are always available in all scopes and are used for very different things.', 'The get superglobal contains information about variables passed through a URL or form. The get superglobal contains information about variables passed through a URL or form.', 'The server superglobal contains information about the server environment. The server superglobal contains information about the server environment.', 'The chapter covers the concept of superglobals in PHP, explaining that they are built-in variables used for various purposes and always available in all scopes, with examples including the get superglobal for variables passed through a URL or form, and the server superglobal containing server environment information. The chapter covers the concept of superglobals in PHP, explaining that they are built-in variables used for various purposes and always available in all scopes, with examples including the get superglobal for variables passed through a URL or form, and the server superglobal containing server environment information.']}, {'end': 6287.12, 'start': 5640.27, 'title': 'Php super globals: get and post', 'summary': 'Discusses the usage of the get and post super globals in php, highlighting their role in obtaining data through urls and forms, the distinction between the two methods, and the importance of using post for secure data submission. it also covers input sanitization and security measures, emphasizing the use of functions like htmlspecialchars and filter_input for protection against potential vulnerabilities.', 'duration': 646.85, 'highlights': ['The importance of using POST for secure data submission Emphasizes the significance of utilizing POST over GET for sensitive data submission, due to its enhanced security measures.', 'Usage of GET and POST in obtaining data through URLs and forms Explains the role of GET and POST in accessing data from URLs and forms, providing examples and demonstrating the distinction between the two methods.', 'Input sanitization and security measures using htmlspecialchars and filter_input Demonstrates the use of htmlspecialchars and filter_input for protecting against potential vulnerabilities, emphasizing the importance of sanitizing inputs to prevent malicious scripts and security threats.']}], 'duration': 876.71, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU5410410.jpg', 'highlights': ['The importance of using POST for secure data submission Emphasizes the significance of utilizing POST over GET for sensitive data submission, due to its enhanced security measures.', 'Input sanitization and security measures using htmlspecialchars and filter_input Demonstrates the use of htmlspecialchars and filter_input for protecting against potential vulnerabilities, emphasizing the importance of sanitizing inputs to prevent malicious scripts and security threats.', 'The get superglobal contains information about variables passed through a URL or form. The get superglobal contains information about variables passed through a URL or form.', 'The server superglobal contains information about the server environment. The server superglobal contains information about the server environment.']}, {'end': 7123.972, 'segs': [{'end': 6384.975, 'src': 'embed', 'start': 6350.702, 'weight': 4, 'content': [{'end': 6352.262, 'text': "OK, so we'll close that up.", 'start': 6350.702, 'duration': 1.56}, {'end': 6352.982, 'text': 'Close that up.', 'start': 6352.322, 'duration': 0.66}, {'end': 6355.863, 'text': 'All right, so most of you probably know what cookies are.', 'start': 6353.603, 'duration': 2.26}, {'end': 6362.305, 'text': "It's a mechanism for storing data in the remote browser and thus tracking or identifying returned users.", 'start': 6356.423, 'duration': 5.882}, {'end': 6368.728, 'text': 'You can set specific data to be stored in the browser and then retrieve it when the user visits the site again.', 'start': 6362.786, 'duration': 5.942}, {'end': 6372.669, 'text': 'Now, cookies, like it says, are stored in the browser.', 'start': 6369.248, 'duration': 3.421}, {'end': 6373.929, 'text': "They're stored on the client.", 'start': 6372.709, 'duration': 1.22}, {'end': 6378.431, 'text': "So you don't really want to have sensitive data in cookies.", 'start': 6374.45, 'duration': 3.981}, {'end': 6384.975, 'text': "If you have sensitive data, your you should store them in a session which I'm going to talk about in the next section.", 'start': 6379.311, 'duration': 5.664}], 'summary': 'Cookies store data in remote browser for tracking users, avoid sensitive data, use session for sensitive data.', 'duration': 34.273, 'max_score': 6350.702, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU6350702.jpg'}, {'end': 6599.06, 'src': 'embed', 'start': 6573.583, 'weight': 3, 'content': [{'end': 6578.706, 'text': 'So sessions are a way to store information in variables to be used across multiple pages.', 'start': 6573.583, 'duration': 5.123}, {'end': 6581.108, 'text': 'Unlike cookies, sessions are stored on the server.', 'start': 6578.906, 'duration': 2.202}, {'end': 6589.053, 'text': "So that's something to really you really need to understand is the data that is set in a cookie is on the user system.", 'start': 6581.148, 'duration': 7.905}, {'end': 6589.934, 'text': "It's in the client.", 'start': 6589.093, 'duration': 0.841}, {'end': 6592.515, 'text': "When you set a session, it's on the server.", 'start': 6590.234, 'duration': 2.281}, {'end': 6593.596, 'text': "So it's more secure.", 'start': 6592.555, 'duration': 1.041}, {'end': 6595.037, 'text': 'OK And you can use it.', 'start': 6594.016, 'duration': 1.021}, {'end': 6599.06, 'text': 'Well, I mean, you could use cookies across multiple pages as well.', 'start': 6595.397, 'duration': 3.663}], 'summary': 'Sessions store data on server, more secure than cookies.', 'duration': 25.477, 'max_score': 6573.583, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU6573583.jpg'}, {'end': 6644.781, 'src': 'embed', 'start': 6618.022, 'weight': 1, 'content': [{'end': 6622.002, 'text': 'And when we submit that, the username gets saved to a session on the server.', 'start': 6618.022, 'duration': 3.98}, {'end': 6627.243, 'text': 'And we can use that session variable on a separate page, on a dashboard page.', 'start': 6622.542, 'duration': 4.701}, {'end': 6629.644, 'text': 'And we can say welcome and then username.', 'start': 6627.483, 'duration': 2.161}, {'end': 6635.645, 'text': "And then I'll show you how to destroy a session by logging out and destroying the username session.", 'start': 6630.344, 'duration': 5.301}, {'end': 6639.165, 'text': "So let's copy from the sanitize inputs.", 'start': 6636.065, 'duration': 3.1}, {'end': 6642.046, 'text': "I'm going to grab this if statement and everything below that.", 'start': 6639.185, 'duration': 2.861}, {'end': 6644.781, 'text': "And let's paste that in.", 'start': 6643.48, 'duration': 1.301}], 'summary': 'Saving username to session, using it on dashboard, and destroying session on logout.', 'duration': 26.759, 'max_score': 6618.022, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU6618022.jpg'}, {'end': 7096.237, 'src': 'embed', 'start': 7052.352, 'weight': 0, 'content': [{'end': 7053.832, 'text': "So we'll say session start.", 'start': 7052.352, 'duration': 1.48}, {'end': 7059.054, 'text': 'And then to destroy, we simply say session underscore destroy.', 'start': 7053.872, 'duration': 5.182}, {'end': 7062.775, 'text': "And then let's redirect back to.", 'start': 7059.074, 'duration': 3.701}, {'end': 7065.542, 'text': 'to the home page.', 'start': 7064.401, 'duration': 1.141}, {'end': 7081.069, 'text': "So we'll say header and in here let's say location and set that to slash php crash and slash 13 underscore sessions dot php.", 'start': 7065.582, 'duration': 15.487}, {'end': 7090.994, 'text': "Alright, so now we'll click log out and I don't think it brought us to the right place.", 'start': 7081.089, 'duration': 9.905}, {'end': 7096.237, 'text': "oh, i have two a's in here.", 'start': 7093.875, 'duration': 2.362}], 'summary': 'Demonstrating session management using php, redirecting to homepage after session destruction.', 'duration': 43.885, 'max_score': 7052.352, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU7052352.jpg'}], 'start': 6287.621, 'title': 'Php login and session management', 'summary': 'Covers the creation of a php login system with session management, demonstrating the use of session variables, session start function, session destroy, and redirection, resulting in successful login, incorrect login, and session destruction.', 'chapters': [{'end': 6734.582, 'start': 6287.621, 'title': 'Handling cookies and sessions in php', 'summary': 'Covers the usage of cookies and sessions in php, including setting and retrieving cookies, using sessions to store user information, and securing sensitive data. it also demonstrates setting and unsetting cookies, as well as setting session variables based on user input.', 'duration': 446.961, 'highlights': ['The chapter introduces the usage of cookies and sessions in PHP, explaining that cookies are stored in the browser and are good for storing non-sensitive user data, while sessions are stored on the server and are more secure for sensitive information. Cookies store data in the browser and are good for non-sensitive user data, while sessions are stored on the server and provide more security for sensitive information.', 'It demonstrates setting a cookie using the setcookie function, specifying the key, value, and expiration time, with an example of setting a cookie to expire after one day. The setcookie function is used to set a cookie, specifying the key, value, and expiration time, with an example of setting a cookie to expire after one day (86400 seconds).', 'The process of retrieving and using cookies is shown, including checking for the existence of a cookie, accessing its value, and deleting a cookie. The process of retrieving and using cookies is demonstrated, including checking for the existence of a cookie, accessing its value, and deleting a cookie.', 'It illustrates the usage of sessions to store user information, including setting a session variable based on user input, and the security benefit of storing sessions on the server. The usage of sessions to store user information is illustrated, including setting a session variable based on user input, and the security benefit of storing sessions on the server.']}, {'end': 7123.972, 'start': 6734.582, 'title': 'Php login and session management', 'summary': 'Demonstrates the creation of a php login system with session management, including the use of session variables, session start function, session destroy, and redirection, resulting in successful login, incorrect login, and session destruction.', 'duration': 389.39, 'highlights': ['The chapter demonstrates the creation of a PHP login system with session management, including the use of session variables, session start function, session destroy, and redirection, resulting in successful login, incorrect login, and session destruction.', "The process involves using session variables to store user information, such as username, and checking for their existence to determine whether to display a personalized welcome message or a generic 'welcome guest' message.", "The session start function is used to initialize a session, and the session destroy function is employed to manually destroy a session, demonstrated through the creation of a 'logout' link that redirects to the home page after destroying the session.", 'The redirection is achieved using the header function by passing the location of the desired page, enabling seamless navigation within the PHP application.', 'The chapter also emphasizes the importance of including common functionality, such as session start, in a header file that can be included in multiple pages, reducing the need to individually initialize sessions across each page.']}], 'duration': 836.351, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU6287621.jpg', 'highlights': ['The chapter demonstrates the creation of a PHP login system with session management, including the use of session variables, session start function, session destroy, and redirection, resulting in successful login, incorrect login, and session destruction.', "The process involves using session variables to store user information, such as username, and checking for their existence to determine whether to display a personalized welcome message or a generic 'welcome guest' message.", "The session start function is used to initialize a session, and the session destroy function is employed to manually destroy a session, demonstrated through the creation of a 'logout' link that redirects to the home page after destroying the session.", 'The chapter introduces the usage of cookies and sessions in PHP, explaining that cookies are stored in the browser and are good for storing non-sensitive user data, while sessions are stored on the server and are more secure for sensitive information.', 'The process of retrieving and using cookies is shown, including checking for the existence of a cookie, accessing its value, and deleting a cookie.']}, {'end': 8230.279, 'segs': [{'end': 7187.098, 'src': 'embed', 'start': 7150.6, 'weight': 0, 'content': [{'end': 7161.045, 'text': "let's say file handling all right, and then let's go to that in the browser.", 'start': 7150.6, 'duration': 10.445}, {'end': 7164.248, 'text': "so let's see 14..", 'start': 7161.045, 'duration': 3.203}, {'end': 7170.995, 'text': 'all right.', 'start': 7164.248, 'duration': 6.747}, {'end': 7172.336, 'text': 'so file handling?', 'start': 7170.995, 'duration': 1.341}, {'end': 7176.295, 'text': 'um, let me just grab the comment here.', 'start': 7172.336, 'duration': 3.959}, {'end': 7180.636, 'text': 'so file handling is the ability to read and write files on the server.', 'start': 7176.295, 'duration': 4.341}, {'end': 7184.697, 'text': 'PHP has built-in functions for reading and writing files.', 'start': 7180.636, 'duration': 4.061}, {'end': 7185.037, 'text': 'all right.', 'start': 7184.697, 'duration': 0.34}, {'end': 7187.098, 'text': "so that's what we're gonna look at.", 'start': 7185.037, 'duration': 2.061}], 'summary': 'File handling in php allows reading and writing files on the server.', 'duration': 36.498, 'max_score': 7150.6, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU7150600.jpg'}, {'end': 7248.371, 'src': 'embed', 'start': 7220.239, 'weight': 4, 'content': [{'end': 7223.563, 'text': "I'm going to show you some different functions that we can use with files.", 'start': 7220.239, 'duration': 3.324}, {'end': 7231.353, 'text': 'So one, if we want to check to see if it actually exists, we can say if file exists and pass in the file name, which I have in a variable.', 'start': 7223.683, 'duration': 7.67}, {'end': 7235.278, 'text': 'And we do have a read file function we could use.', 'start': 7232.194, 'duration': 3.084}, {'end': 7238.601, 'text': 'So we could pass that and say file.', 'start': 7236.078, 'duration': 2.523}, {'end': 7241.324, 'text': 'So what that does is it reads the file.', 'start': 7239.362, 'duration': 1.962}, {'end': 7244.167, 'text': "And you can see we're printing out the contents of it.", 'start': 7241.484, 'duration': 2.683}, {'end': 7248.371, 'text': "And the 26 here, I believe that's the number of bytes of the file.", 'start': 7244.487, 'duration': 3.884}], 'summary': 'Demonstration of file functions: check existence, read file, and print file contents, with example of 26 bytes.', 'duration': 28.132, 'max_score': 7220.239, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU7220239.jpg'}, {'end': 7477.298, 'src': 'embed', 'start': 7438.201, 'weight': 1, 'content': [{'end': 7440.463, 'text': "And let's go over here to 15 file upload.", 'start': 7438.201, 'duration': 2.262}, {'end': 7450.526, 'text': 'all right.', 'start': 7450.046, 'duration': 0.48}, {'end': 7453.068, 'text': "so let's talk about file uploading.", 'start': 7450.526, 'duration': 2.542}, {'end': 7455.93, 'text': "so we'll start off by just creating a form.", 'start': 7453.068, 'duration': 2.862}, {'end': 7460.013, 'text': "let's say file upload and then form.", 'start': 7455.93, 'duration': 4.083}, {'end': 7460.794, 'text': 'now the action.', 'start': 7460.013, 'duration': 0.781}, {'end': 7466.678, 'text': "i'm just going to go ahead and echo out using my server, super global,", 'start': 7460.794, 'duration': 5.884}, {'end': 7473.992, 'text': 'and we want php underscore self and of course you can submit to a different folks.', 'start': 7466.678, 'duration': 7.314}, {'end': 7477.298, 'text': "you can submit to a different file if you'd like.", 'start': 7473.992, 'duration': 3.306}], 'summary': 'Demonstrating file upload process using php self global variable.', 'duration': 39.097, 'max_score': 7438.201, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU7438201.jpg'}, {'end': 7755.417, 'src': 'embed', 'start': 7723.23, 'weight': 5, 'content': [{'end': 7737.28, 'text': 'So we have an object that has or an array that has a name a full path a type a temp name temporary name an error value and a size.', 'start': 7723.23, 'duration': 14.05}, {'end': 7740.923, 'text': 'OK so we have all this this data to work with.', 'start': 7738.12, 'duration': 2.803}, {'end': 7743.766, 'text': "So what we'll do is put some of this into variables.", 'start': 7741.023, 'duration': 2.743}, {'end': 7755.417, 'text': "So for instance file name let's set that to files and then we want the upload file and we want the name.", 'start': 7744.266, 'duration': 11.151}], 'summary': 'Processing object data to extract file name and upload file name.', 'duration': 32.187, 'max_score': 7723.23, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU7723230.jpg'}, {'end': 7985.428, 'src': 'embed', 'start': 7949.041, 'weight': 6, 'content': [{'end': 7953.066, 'text': "In fact, let's go ahead and just echo out file extension.", 'start': 7949.041, 'duration': 4.025}, {'end': 7959.975, 'text': "And then let's and there it is, because it's already submitted when it reloaded and we're getting PNG.", 'start': 7953.086, 'duration': 6.889}, {'end': 7967.481, 'text': "So now that we have that, let's check for that and make sure that the file is an image.", 'start': 7960.676, 'duration': 6.805}, {'end': 7973.843, 'text': "so actually we'll just say validate file file extension.", 'start': 7967.481, 'duration': 6.362}, {'end': 7985.428, 'text': 'and remember, when we were looking at array methods, there was an in underscore array function, and what that takes in is is first what,', 'start': 7973.843, 'duration': 11.585}], 'summary': 'Validating file extension to ensure it is an image, received png.', 'duration': 36.387, 'max_score': 7949.041, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU7949041.jpg'}, {'end': 8066.139, 'src': 'embed', 'start': 8028.215, 'weight': 7, 'content': [{'end': 8034.897, 'text': "So let's say if, and we'll say if the file underscore size.", 'start': 8028.215, 'duration': 6.682}, {'end': 8042.26, 'text': "so if that is less than or equal to and this is going to be in bytes, so let's do one megabytes, which is going to be", 'start': 8034.897, 'duration': 7.363}, {'end': 8046.463, 'text': 'one with six zeros.', 'start': 8043.881, 'duration': 2.582}, {'end': 8053.248, 'text': "So we'll say if it's less than or equal to that, then we'll keep going.", 'start': 8046.483, 'duration': 6.765}, {'end': 8066.139, 'text': "Else, then let's take this message and paste that in and we'll say the file is too large.", 'start': 8053.528, 'duration': 12.611}], 'summary': "If file size <= 1mb, continue; else, display 'file is too large.'", 'duration': 37.924, 'max_score': 8028.215, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU8028215.jpg'}, {'end': 8159.32, 'src': 'embed', 'start': 8129.889, 'weight': 2, 'content': [{'end': 8132.231, 'text': "And then let's create the uploads folder.", 'start': 8129.889, 'duration': 2.342}, {'end': 8135.774, 'text': "So we'll create a folder called uploads.", 'start': 8133.212, 'duration': 2.562}, {'end': 8138.336, 'text': "And let's try it out.", 'start': 8137.335, 'duration': 1.001}, {'end': 8139.617, 'text': "So we'll choose a file.", 'start': 8138.436, 'duration': 1.181}, {'end': 8141.438, 'text': "Let's grab it and submit.", 'start': 8139.637, 'duration': 1.801}, {'end': 8147.713, 'text': "All right, so it looks like I'm getting a permission denied, so it didn't get uploaded.", 'start': 8143.43, 'duration': 4.283}, {'end': 8155.958, 'text': "So this is just because on my system, the the uploads folder doesn't have the correct permissions.", 'start': 8147.753, 'duration': 8.205}, {'end': 8159.32, 'text': "So let's see to get around this.", 'start': 8157.239, 'duration': 2.081}], 'summary': 'Troubleshooting permission denied issue with uploads folder.', 'duration': 29.431, 'max_score': 8129.889, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU8129889.jpg'}], 'start': 7125.515, 'title': 'Php file handling and upload', 'summary': 'Covers file handling in php, demonstrating reading, writing, and text file creation, along with file uploading, including form creation, submission handling, and essential attributes for successful file uploads, addressing file details, validations, and permission issues.', 'chapters': [{'end': 7218.761, 'start': 7125.515, 'title': 'Php file handling', 'summary': 'Covers file handling in php, including the ability to read and write files on the server using built-in functions. it also demonstrates creating and accessing a text file for user data.', 'duration': 93.246, 'highlights': ['PHP has built-in functions for reading and writing files.', "Creating a file and setting a variable to access it, as demonstrated with 'users.txt' in the 'extras' folder.", 'File handling is the ability to read and write files on the server.']}, {'end': 7693.851, 'start': 7220.239, 'title': 'File handling and upload in php', 'summary': "Covers file handling in php, including functions to check file existence, read file contents, and write to a file, as well as file uploading with php, demonstrating the creation of a form and handling file submission, with a special attribute 'multipart/form-data' required for file upload.", 'duration': 473.612, 'highlights': ['Demonstrating file handling functions in PHP, including checking file existence, reading file contents, and writing to a file with examples and code explanation. The chapter covers functions like file_exists, fread, and fwrite, demonstrating their usage and providing code examples.', "Explaining the process of file upload in PHP, including creating a form, setting the form action and method, and specifying the 'multipart/form-data' attribute required for file upload. The chapter details the creation of a file upload form, setting form attributes, and checks required for handling file uploads in PHP."]}, {'end': 8230.279, 'start': 7693.891, 'title': 'Php file upload process', 'summary': 'Covers the process of uploading files using php, including handling file details and validations, such as file type and size, before moving the file to the target directory and addressing permission issues, ultimately achieving a successful file upload.', 'duration': 536.388, 'highlights': ['Explaining the process of handling file details and setting them into variables. Demonstrates setting file name and size into variables, providing a clear understanding of the file details for processing.', 'Addressing file type validation by checking the file extension against allowed extensions, ensuring the uploaded file is an image. Illustrates checking the file extension against allowed extensions to validate if the uploaded file is an image, enhancing security and preventing unauthorized file uploads.', 'Validating the file size to ensure it meets the specified criteria before proceeding with the upload process. Shows how to validate the file size to prevent uploading files that exceed the specified size limit, enhancing control over the uploaded content.', 'Handling permission issues by adjusting folder permissions to enable successful file uploads. Demonstrates addressing permission issues by adjusting folder permissions, ensuring a successful file upload process even in cases of permission denial.']}], 'duration': 1104.764, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU7125515.jpg', 'highlights': ['Covers file handling in php, including reading, writing, and text file creation.', 'Demonstrates file upload in PHP, including form creation, submission handling, and essential attributes.', 'Explains handling file details, validations, and permission issues for successful file uploads.', 'PHP has built-in functions for reading and writing files.', 'Demonstrates checking file existence, reading file contents, and writing to a file with examples and code explanation.', 'Explains the process of handling file details and setting them into variables.', 'Addresses file type validation by checking the file extension against allowed extensions.', 'Validates the file size to ensure it meets the specified criteria before proceeding with the upload process.', 'Handles permission issues by adjusting folder permissions to enable successful file uploads.']}, {'end': 10301.503, 'segs': [{'end': 8302.739, 'src': 'embed', 'start': 8271.248, 'weight': 0, 'content': [{'end': 8272.728, 'text': 'And this is from the documentation.', 'start': 8271.248, 'duration': 1.48}, {'end': 8276.83, 'text': 'So PHP has an exception model similar to that of other programming languages.', 'start': 8272.808, 'duration': 4.022}, {'end': 8286.633, 'text': 'An exception can be thrown and caught within PHP code may be surrounded in a try block to facilitate the catching of potential exceptions.', 'start': 8277.35, 'duration': 9.283}, {'end': 8291.193, 'text': 'And each try must have at least one corresponding catch or finally block.', 'start': 8287.053, 'duration': 4.14}, {'end': 8296.835, 'text': "So if you're familiar with like try catch in JavaScript or another language, This is going to be really easy.", 'start': 8291.593, 'duration': 5.242}, {'end': 8302.739, 'text': "But let's go ahead and create a function of inverse, which takes in a single argument.", 'start': 8296.956, 'duration': 5.783}], 'summary': 'Php has an exception model similar to other languages, using try-catch blocks. each try must have at least one corresponding catch or finally block.', 'duration': 31.491, 'max_score': 8271.248, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU8271248.jpg'}, {'end': 8598.311, 'src': 'embed', 'start': 8573.358, 'weight': 2, 'content': [{'end': 8581.204, 'text': 'And if you have experience with like Java or C Sharp, then this should be easy for you when it comes to creating classes.', 'start': 8573.358, 'duration': 7.846}, {'end': 8586.986, 'text': 'Object-oriented programming in PHP consists of classes that can hold properties and methods,', 'start': 8582.084, 'duration': 4.902}, {'end': 8590.768, 'text': 'which are basically just variables and functions within a class.', 'start': 8586.986, 'duration': 3.782}, {'end': 8594.249, 'text': 'And then you can create objects from the class.', 'start': 8591.368, 'duration': 2.881}, {'end': 8596.37, 'text': "So let's start off here.", 'start': 8594.909, 'duration': 1.461}, {'end': 8598.311, 'text': "We'll just create a class of user.", 'start': 8596.39, 'duration': 1.921}], 'summary': 'Php object-oriented programming involves creating classes to hold properties and methods, with java or c sharp experience making it easier, and the ability to create objects from the class.', 'duration': 24.953, 'max_score': 8573.358, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU8573358.jpg'}, {'end': 8993.283, 'src': 'embed', 'start': 8956.692, 'weight': 4, 'content': [{'end': 8960.075, 'text': "so let's go right here, and i'm going to say a.", 'start': 8956.692, 'duration': 3.383}, {'end': 8972.118, 'text': 'a constructor is a function or a method that runs when an object is created.', 'start': 8960.075, 'duration': 12.043}, {'end': 8972.498, 'text': 'All right.', 'start': 8972.138, 'duration': 0.36}, {'end': 8973.859, 'text': 'So it runs automatically.', 'start': 8972.538, 'duration': 1.321}, {'end': 8983.645, 'text': 'And the way we create it is we say public function and then we call it double underscore construct.', 'start': 8973.879, 'duration': 9.766}, {'end': 8987.659, 'text': 'I like to have my parentheses up here.', 'start': 8985.578, 'duration': 2.081}, {'end': 8993.283, 'text': "And what this will do is it'll take in actually before we do any of that, let's just echo.", 'start': 8988.64, 'duration': 4.643}], 'summary': 'A constructor is a method that runs when an object is created, created using public function double underscore construct.', 'duration': 36.591, 'max_score': 8956.692, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU8956692.jpg'}, {'end': 9333.659, 'src': 'embed', 'start': 9303.385, 'weight': 6, 'content': [{'end': 9306.987, 'text': 'And then to run the constructor for the parent class, we use this here.', 'start': 9303.385, 'duration': 3.602}, {'end': 9313.871, 'text': "And then we can continue to create new properties and methods for that, what's called a subclass.", 'start': 9308.107, 'duration': 5.764}, {'end': 9315.024, 'text': 'All right.', 'start': 9314.824, 'duration': 0.2}, {'end': 9317.406, 'text': "So now we're going to work on the feedback project.", 'start': 9315.064, 'duration': 2.342}, {'end': 9321.249, 'text': 'So if you go to the link in the description, the GitHub repo.', 'start': 9317.486, 'duration': 3.763}, {'end': 9324.992, 'text': "And actually, I don't want to leave that page.", 'start': 9323.05, 'duration': 1.942}, {'end': 9326.974, 'text': "Let's open it up here.", 'start': 9325.012, 'duration': 1.962}, {'end': 9333.659, 'text': 'And you go to the PHP crash again, links in the description.', 'start': 9329.235, 'duration': 4.424}], 'summary': 'The lecture covers running the constructor for the parent class, creating properties and methods for a subclass, and working on the feedback project with a github repository link provided.', 'duration': 30.274, 'max_score': 9303.385, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU9303385.jpg'}, {'end': 9612.666, 'src': 'embed', 'start': 9580.205, 'weight': 7, 'content': [{'end': 9584.607, 'text': 'so i want to bring it in so to bring one php file into another.', 'start': 9580.205, 'duration': 4.402}, {'end': 9588.609, 'text': "there's a couple couple functions we can use.", 'start': 9584.607, 'duration': 4.002}, {'end': 9589.829, 'text': 'one is include.', 'start': 9588.609, 'duration': 1.22}, {'end': 9601.795, 'text': "so let's say include, and we want in the inc folder slash header dot php and if we save that now, we have the header back.", 'start': 9589.829, 'duration': 11.966}, {'end': 9609.044, 'text': 'If I copy this, bring it down here, paste that in and then we also want to include the footer.', 'start': 9602.662, 'duration': 6.382}, {'end': 9610.685, 'text': 'Now we have the footer.', 'start': 9609.765, 'duration': 0.92}, {'end': 9612.666, 'text': 'So include is one.', 'start': 9611.445, 'duration': 1.221}], 'summary': 'Using php include function to bring one php file into another, including header and footer.', 'duration': 32.461, 'max_score': 9580.205, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU9580205.jpg'}, {'end': 9829.284, 'src': 'embed', 'start': 9801.422, 'weight': 8, 'content': [{'end': 9809.413, 'text': "So if we go to our local hosts on Mac, it's going to be 8080 and then slash phpMyAdmin.", 'start': 9801.422, 'duration': 7.991}, {'end': 9814.416, 'text': 'So here we can see the databases on the side by default.', 'start': 9810.754, 'duration': 3.662}, {'end': 9817.618, 'text': "You'll have like this information schema and so on.", 'start': 9814.436, 'duration': 3.182}, {'end': 9823.121, 'text': 'And what we want to do is go to this databases tab and we can create our new database.', 'start': 9818.138, 'duration': 4.983}, {'end': 9825.603, 'text': "I'm just going to call it PHP underscore dev.", 'start': 9823.241, 'duration': 2.362}, {'end': 9829.284, 'text': 'click create and then we want to create a table.', 'start': 9826.423, 'duration': 2.861}], 'summary': "Using local host on mac, accessing databases, creating a new database 'php_dev' and a table.", 'duration': 27.862, 'max_score': 9801.422, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU9801422.jpg'}, {'end': 10100.638, 'src': 'heatmap', 'start': 9974.911, 'weight': 0.801, 'content': [{'end': 9977.754, 'text': 'And if you need to add more, you can just add more columns.', 'start': 9974.911, 'duration': 2.843}, {'end': 9978.354, 'text': 'Click Go.', 'start': 9977.834, 'duration': 0.52}, {'end': 9979.715, 'text': "We're going to click Save.", 'start': 9978.694, 'duration': 1.021}, {'end': 9982.158, 'text': 'And now we have our table structure.', 'start': 9980.296, 'duration': 1.862}, {'end': 9987.808, 'text': 'if we want to actually insert data into the database, we can.', 'start': 9983.584, 'duration': 4.224}, {'end': 9989.469, 'text': 'we can actually do it from here.', 'start': 9987.808, 'duration': 1.661}, {'end': 9991.651, 'text': 'ultimately, we want our app to do it.', 'start': 9989.469, 'duration': 2.182}, {'end': 9994.514, 'text': 'but we can click on the insert tab here.', 'start': 9991.651, 'duration': 2.863}, {'end': 10005.724, 'text': "the id you're not never going to put in that will get put in automatically for name, let's say john doe, and then email, and then for that body.", 'start': 9994.514, 'duration': 11.21}, {'end': 10006.805, 'text': 'so this is a feedback.', 'start': 10005.724, 'duration': 1.081}, {'end': 10013.947, 'text': "i'll just say traversing media is a good source to learn from.", 'start': 10006.805, 'duration': 7.142}, {'end': 10014.488, 'text': "I don't know.", 'start': 10013.967, 'duration': 0.521}, {'end': 10015.648, 'text': "I guess that's good.", 'start': 10014.508, 'duration': 1.14}, {'end': 10018.409, 'text': 'And the date will be the current timestamp.', 'start': 10016.288, 'duration': 2.121}, {'end': 10023.871, 'text': 'So if we click go, it says one row inserted and it also gives us the actual SQL.', 'start': 10018.429, 'duration': 5.442}, {'end': 10028.573, 'text': 'So SQL stands for crusted, structured query language.', 'start': 10024.291, 'duration': 4.282}, {'end': 10037.118, 'text': "And that's what my SQL uses, as well as just about all relational databases such as postgres oracle.", 'start': 10029.333, 'duration': 7.785}, {'end': 10045.765, 'text': 'so sql, this is this is how we insert into a certain table we put the fields, then we put the values.', 'start': 10037.118, 'duration': 8.647}, {'end': 10050.989, 'text': "i do have an sql crash course if you want to learn more about the syntax, but this isn't.", 'start': 10045.765, 'duration': 5.224}, {'end': 10053.712, 'text': "you know we're not gonna dive deep into sql syntax.", 'start': 10050.989, 'duration': 2.723}, {'end': 10059.685, 'text': 'So now, if we go back to browse, we should see our one record here.', 'start': 10054.899, 'duration': 4.786}, {'end': 10062.748, 'text': 'Now we also need to create a user for this database.', 'start': 10060.005, 'duration': 2.743}, {'end': 10072.175, 'text': "So if we go, make sure you're in the PHP dev database, and if you go to privileges, You'll see there is a root user, but I'm not going to use that.", 'start': 10063.329, 'duration': 8.846}, {'end': 10081.223, 'text': "I'm going to click this add user account and for username, I'm going to say Brad and under host, I'm going to choose local.", 'start': 10072.255, 'duration': 8.968}, {'end': 10084.245, 'text': 'So local host and then password.', 'start': 10081.403, 'duration': 2.842}, {'end': 10086.087, 'text': "I'll just do one through six.", 'start': 10084.265, 'duration': 1.822}, {'end': 10100.638, 'text': "and let's see down here we're going to grant all privileges because you can have a user just be able to read data or maybe create but not update stuff like that.", 'start': 10090.453, 'duration': 10.185}], 'summary': 'Demonstration of inserting data into a database using sql, creating a user account with all privileges.', 'duration': 125.727, 'max_score': 9974.911, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU9974911.jpg'}, {'end': 10129.013, 'src': 'embed', 'start': 10100.638, 'weight': 9, 'content': [{'end': 10104.741, 'text': "so we're just going to grant all and then that should do it.", 'start': 10100.638, 'duration': 4.103}, {'end': 10112.825, 'text': "we'll click, go and you can see the sql that was ran create user brad and grant privileges, etc.", 'start': 10104.741, 'duration': 8.084}, {'end': 10120.342, 'text': 'and now, if we go to user accounts, you should see the Brad user or obviously whatever you called it.', 'start': 10112.825, 'duration': 7.517}, {'end': 10122.024, 'text': "I'm sure you didn't call it Brad, or maybe you did.", 'start': 10120.382, 'duration': 1.642}, {'end': 10123.787, 'text': "But it doesn't matter.", 'start': 10123.006, 'duration': 0.781}, {'end': 10129.013, 'text': 'So now we want to connect to it through our applications.', 'start': 10124.087, 'duration': 4.926}], 'summary': 'Granting user privileges in sql and connecting to applications.', 'duration': 28.375, 'max_score': 10100.638, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU10100638.jpg'}, {'end': 10211.66, 'src': 'embed', 'start': 10185.399, 'weight': 10, 'content': [{'end': 10190.844, 'text': "So in our database dot PHP, we're going to first of all just define some constants.", 'start': 10185.399, 'duration': 5.445}, {'end': 10198.41, 'text': "Remember back in the beginning, we learned how to do this, define and I'm going to call it DB underscore host.", 'start': 10191.484, 'duration': 6.926}, {'end': 10201.652, 'text': "And I'm using constants because these aren't going to change.", 'start': 10199.03, 'duration': 2.622}, {'end': 10205.796, 'text': "And if they do, it's because you're going into production or whatever.", 'start': 10202.793, 'duration': 3.003}, {'end': 10209.058, 'text': "So let's do host and then we'll have a couple more.", 'start': 10206.356, 'duration': 2.702}, {'end': 10211.66, 'text': 'We need the user.', 'start': 10209.078, 'duration': 2.582}], 'summary': 'In the database dot php, constants like db_host are defined to store unchanging data.', 'duration': 26.261, 'max_score': 10185.399, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU10185399.jpg'}], 'start': 8230.62, 'title': 'Php exception handling and object oriented programming', 'summary': 'Introduces handling errors in php through try catch blocks, covering throwing and catching exceptions, usage of try-catch blocks and finally blocks, as well as object-oriented programming in php including classes, properties, methods, access modifiers, constructors, and setters and getters.', 'chapters': [{'end': 8291.193, 'start': 8230.62, 'title': 'Handling php exceptions', 'summary': 'Introduces handling errors in php through try catch blocks and mentions the requirement of at least one corresponding catch or finally block for each try, sourced from the official php documentation.', 'duration': 60.573, 'highlights': ['PHP has an exception model similar to that of other programming languages, allowing exceptions to be thrown and caught within PHP code, and may be surrounded in a try block to facilitate the catching of potential exceptions.', 'Each try must have at least one corresponding catch or finally block.']}, {'end': 9021.495, 'start': 8291.593, 'title': 'Exception handling and object oriented programming', 'summary': 'Covers exception handling in php, demonstrating how to throw and catch exceptions, as well as the usage of try-catch blocks and finally blocks. it also introduces object-oriented programming in php, explaining the creation of classes, properties, methods, access modifiers, constructors, and setters and getters.', 'duration': 729.902, 'highlights': ['Object-oriented programming Object-oriented programming in PHP consists of classes that can hold properties and methods, which are basically just variables and functions within a class.', 'Exception handling The chapter demonstrates how to throw and catch exceptions in PHP, using try-catch blocks to handle errors elegantly and avoid fatal errors, showing the usage of finally block to execute code regardless of whether an exception is thrown or not.', 'Constructors A constructor is a method that runs automatically when an object is created in PHP, and it can be used to initialize object properties without the need to explicitly call the initialization.']}, {'end': 9664.777, 'start': 9022.756, 'title': 'Php classes, inheritance, and including php files', 'summary': 'Covers php classes, constructors, instantiation, inheritance, and including php files. it also delves into how to extend a parent class, create a subclass, and work on a feedback project involving php and html files.', 'duration': 642.021, 'highlights': ['The chapter covers PHP classes, constructors, instantiation, inheritance, and including PHP files. Covers key concepts of PHP programming including classes, constructors, instantiation, inheritance, and including PHP files.', 'Extending a parent class, creating a subclass, and working on a feedback project involving PHP and HTML files. Explains the process of extending a parent class, creating a subclass, and working on a feedback project that involves PHP and HTML files.', "Demonstrates how to include PHP files into one another using 'include' and 'require' functions. Explains how to include PHP files into one another using 'include' and 'require' functions, with a preference for 'include' due to its behavior when the file is not found."]}, {'end': 10301.503, 'start': 9664.777, 'title': 'Setting up database and connecting to mysqli', 'summary': 'Covers setting up a database using phpmyadmin, creating a table with fields, and connecting to mysqli by defining constants and establishing a connection, with a focus on creating a user account and privileges for the database.', 'duration': 636.726, 'highlights': ["Creating a new database called PHP_dev and a table called feedback with five columns using PHPMyAdmin. The speaker demonstrates creating a new database 'PHP_dev' and a table 'feedback' using PHPMyAdmin, with a focus on defining five columns including an ID, name, email, feedback body, and date.", "Setting up a user account 'Brad' with all privileges for the database. Creation of a user account 'Brad' with all privileges for the 'PHP_dev' database is illustrated, emphasizing the use of a graphical interface in setting user privileges.", 'Defining constants for database host, user, password, and name, and establishing a connection to MySQL using MySQLi. The process of defining constants for database host, user, password, and name, and then establishing a connection to MySQL using MySQLi is explained, highlighting the approach to creating a new instance of MySQL and checking the connection for errors.']}], 'duration': 2070.883, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU8230620.jpg', 'highlights': ['PHP has an exception model similar to other languages, allowing exceptions to be thrown and caught within PHP code.', 'Each try must have at least one corresponding catch or finally block.', 'Object-oriented programming in PHP consists of classes holding properties and methods.', 'The chapter demonstrates how to throw and catch exceptions in PHP using try-catch blocks.', 'A constructor is a method that runs automatically when an object is created in PHP.', 'The chapter covers key concepts of PHP programming including classes, constructors, instantiation, and inheritance.', 'Explains the process of extending a parent class, creating a subclass, and working on a feedback project involving PHP and HTML files.', "Demonstrates how to include PHP files into one another using 'include' and 'require' functions.", "Creating a new database 'PHP_dev' and a table 'feedback' with five columns using PHPMyAdmin.", "Setting up a user account 'Brad' with all privileges for the database.", 'Defining constants for database host, user, password, and name, and establishing a connection to MySQL using MySQLi.']}, {'end': 11735.451, 'segs': [{'end': 10453.71, 'src': 'embed', 'start': 10423.822, 'weight': 1, 'content': [{'end': 10428.045, 'text': "so let's put that back over here.", 'start': 10423.822, 'duration': 4.223}, {'end': 10429.146, 'text': 'now to fetch the data.', 'start': 10428.045, 'duration': 1.101}, {'end': 10433.309, 'text': "let's go to our feedback.php, because that's where we're going to want to put this.", 'start': 10429.146, 'duration': 4.163}, {'end': 10440.586, 'text': "And let's actually start with just some hard-coded data up here before we actually fetch it from the database.", 'start': 10434.684, 'duration': 5.902}, {'end': 10442.906, 'text': "So we'll open up some PHP tags.", 'start': 10440.666, 'duration': 2.24}, {'end': 10448.588, 'text': "And I'm just going to paste in a hard-coded array of feedback items.", 'start': 10443.747, 'duration': 4.841}, {'end': 10453.71, 'text': 'So just a multi-dimensional array that has an ID, a name, email, and body.', 'start': 10448.908, 'duration': 4.802}], 'summary': 'Fetching data from feedback.php and adding hard-coded array of feedback items for testing.', 'duration': 29.888, 'max_score': 10423.822, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU10423822.jpg'}, {'end': 10770.185, 'src': 'embed', 'start': 10714.349, 'weight': 0, 'content': [{'end': 10717.89, 'text': 'it showed like the insert into or the select from.', 'start': 10714.349, 'duration': 3.541}, {'end': 10719.39, 'text': "So we're going to say select.", 'start': 10717.91, 'duration': 1.48}, {'end': 10722.986, 'text': "all, and this doesn't have to be uppercase.", 'start': 10720.982, 'duration': 2.004}, {'end': 10724.288, 'text': "It's just kind of a convention.", 'start': 10723.066, 'duration': 1.222}, {'end': 10729.377, 'text': "We're going to select all fields from the feedback table.", 'start': 10724.308, 'duration': 5.069}, {'end': 10732.375, 'text': "Okay, so that's our SQL.", 'start': 10731.135, 'duration': 1.24}, {'end': 10734.996, 'text': 'Then we want to say result.', 'start': 10733.196, 'duration': 1.8}, {'end': 10744.499, 'text': 'So the result of that we can get with a function called my SQL I, my SQL I, and then underscore query.', 'start': 10735.456, 'duration': 9.043}, {'end': 10755.002, 'text': "And then we want to pass in two things the connection which we're getting because we're including the header, which is including the database,", 'start': 10746.059, 'duration': 8.943}, {'end': 10757.263, 'text': 'and then the SQL that we just wrote.', 'start': 10755.002, 'duration': 2.261}, {'end': 10758.483, 'text': "So that's going to include that.", 'start': 10757.483, 'duration': 1}, {'end': 10767.704, 'text': "OK, and then we're going to create our feedback variable again, except instead of a hard coded array, we're going to set it to my SQL.", 'start': 10759.36, 'duration': 8.344}, {'end': 10770.185, 'text': 'I underscore fetch all.', 'start': 10767.724, 'duration': 2.461}], 'summary': 'Using sql to select all fields from feedback table and fetch the result.', 'duration': 55.836, 'max_score': 10714.349, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU10714349.jpg'}, {'end': 10825.723, 'src': 'embed', 'start': 10794.373, 'weight': 7, 'content': [{'end': 10796.093, 'text': "except it's going to come from the database.", 'start': 10794.373, 'duration': 1.72}, {'end': 10797.694, 'text': "So now I'm going to save.", 'start': 10796.653, 'duration': 1.041}, {'end': 10799.194, 'text': 'And there we go.', 'start': 10798.634, 'duration': 0.56}, {'end': 10807.657, 'text': "So now we're seeing the items that we have inside of our database, these two items here from Sally and John.", 'start': 10799.634, 'duration': 8.023}, {'end': 10810.477, 'text': 'And then there is also a date in the database.', 'start': 10808.317, 'duration': 2.16}, {'end': 10817.177, 'text': "So where it says by name, after the name, i'm just gonna say on and then the date.", 'start': 10810.537, 'duration': 6.64}, {'end': 10825.723, 'text': 'so php, echo, item and date and then close that up.', 'start': 10817.177, 'duration': 8.546}], 'summary': 'Displaying two items from the database with names sally and john.', 'duration': 31.35, 'max_score': 10794.373, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU10794373.jpg'}, {'end': 10994.961, 'src': 'embed', 'start': 10928.024, 'weight': 3, 'content': [{'end': 10933.568, 'text': "Because what I want to do is, if like, if we don't have a name or something and we submit,", 'start': 10928.024, 'duration': 5.544}, {'end': 10937.61, 'text': 'I want to show the error underneath using some of the bootstrap classes.', 'start': 10933.568, 'duration': 4.042}, {'end': 10939.652, 'text': "So it'll have a red outline with the error.", 'start': 10937.65, 'duration': 2.002}, {'end': 10941.073, 'text': 'All right.', 'start': 10940.792, 'duration': 0.281}, {'end': 10942.574, 'text': "So we'll do some form validation.", 'start': 10941.093, 'duration': 1.481}, {'end': 10947.417, 'text': "So let's say form submit and remember how we were checking it.", 'start': 10943.695, 'duration': 3.722}, {'end': 10951.74, 'text': 'We were saying if is set and then we were checking the post.', 'start': 10947.457, 'duration': 4.283}, {'end': 10955.002, 'text': 'So post submit.', 'start': 10952.46, 'duration': 2.542}, {'end': 10961.686, 'text': 'And actually before we do that we should probably make sure our form is all set.', 'start': 10957.503, 'duration': 4.183}, {'end': 10963.247, 'text': 'We need the method to be post.', 'start': 10961.726, 'duration': 1.521}, {'end': 10972.121, 'text': "OK, method post and then in the action, let's say PHP echo.", 'start': 10967.097, 'duration': 5.024}, {'end': 10975.284, 'text': "Let's use our HTML special chars.", 'start': 10972.221, 'duration': 3.063}, {'end': 10987.434, 'text': "And inside that, we're going to put our server super global and we want to we want this to be PHP underscore self.", 'start': 10977.906, 'duration': 9.528}, {'end': 10992.579, 'text': "All right, so it'll submit to this same file.", 'start': 10989.616, 'duration': 2.963}, {'end': 10994.961, 'text': "Now up here, let's.", 'start': 10993.84, 'duration': 1.121}], 'summary': 'Implementing form validation with bootstrap classes for error display.', 'duration': 66.937, 'max_score': 10928.024, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU10928024.jpg'}, {'end': 11437.961, 'src': 'embed', 'start': 11400.855, 'weight': 5, 'content': [{'end': 11405.739, 'text': 'but I wanted to make it a little interesting rather than just having one message up at the top.', 'start': 11400.855, 'duration': 4.884}, {'end': 11408.921, 'text': 'So now we have the error checking.', 'start': 11407.019, 'duration': 1.902}, {'end': 11411.943, 'text': 'We can submit, we can do the error checking.', 'start': 11409.701, 'duration': 2.242}, {'end': 11418.147, 'text': "Now after that, what we'll do is just make sure that there's no errors.", 'start': 11412.523, 'duration': 5.624}, {'end': 11419.868, 'text': "So let's do an if statement here.", 'start': 11418.187, 'duration': 1.681}, {'end': 11437.961, 'text': "We're gonna say if empty name error And if empty email error and if empty body error.", 'start': 11419.949, 'duration': 18.012}], 'summary': 'Implemented error checking for name, email, and body fields.', 'duration': 37.106, 'max_score': 11400.855, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU11400855.jpg'}, {'end': 11684.655, 'src': 'embed', 'start': 11659.023, 'weight': 8, 'content': [{'end': 11664.147, 'text': "So if you followed along through the whole thing and coded along with me, then you're awesome.", 'start': 11659.023, 'duration': 5.124}, {'end': 11667.89, 'text': "You're probably like like five percent of people that watch this.", 'start': 11664.167, 'duration': 3.723}, {'end': 11669.95, 'text': 'So I really appreciate it.', 'start': 11668.85, 'duration': 1.1}, {'end': 11671.731, 'text': 'I hope that you learned a lot from it.', 'start': 11669.97, 'duration': 1.761}, {'end': 11677.093, 'text': 'From here, I would probably recommend looking more into object oriented programming.', 'start': 11672.311, 'duration': 4.782}, {'end': 11681.254, 'text': "I think it's a lot neater in PHP because PHP can be kind of messy.", 'start': 11677.153, 'duration': 4.101}, {'end': 11684.655, 'text': "You can just look at this, and it's not the best looking code, right?", 'start': 11681.294, 'duration': 3.361}], 'summary': 'Around 5% of viewers code along in the tutorial; recommended further exploration into object-oriented programming in php.', 'duration': 25.632, 'max_score': 11659.023, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU11659023.jpg'}, {'end': 11723.425, 'src': 'embed', 'start': 11698.597, 'weight': 9, 'content': [{'end': 11704.939, 'text': "It's a it's a it's an object oriented model view controller course where we actually build a PHP framework.", 'start': 11698.597, 'duration': 6.342}, {'end': 11712.68, 'text': "So that's probably where I would suggest going to next, maybe watching like the PDO crash course I have first.", 'start': 11705.519, 'duration': 7.161}, {'end': 11716.602, 'text': 'maybe another simple php project.', 'start': 11713.34, 'duration': 3.262}, {'end': 11721.184, 'text': 'i do have one where we create a rest api with just vanilla php.', 'start': 11716.602, 'duration': 4.582}, {'end': 11723.425, 'text': "that's something you could check out.", 'start': 11721.184, 'duration': 2.241}], 'summary': 'Object-oriented mvc php course with a php framework and a pdo crash course available, along with a vanilla php rest api project.', 'duration': 24.828, 'max_score': 11698.597, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU11698597.jpg'}], 'start': 10303.596, 'title': 'Php database operations', 'summary': 'Covers setting up a database connection, retrieving and displaying data, fetching data from a database, form validation, error handling, and adding form data to the database using php, mysql, and bootstrap, with an emphasis on simplicity for beginners and a recommendation for further learning.', 'chapters': [{'end': 10668.283, 'start': 10303.596, 'title': 'Database connection and data retrieval', 'summary': 'Covers setting up a database connection in php, including handling potential connection errors, and retrieving and displaying feedback data from the database, with a demonstration of using hard-coded data and looping through an array to display it on a web page.', 'duration': 364.687, 'highlights': ['Setting up database connection and handling potential connection errors The tutorial guides the viewer through setting up a database connection in PHP and handling potential connection errors, such as access denied, by providing instructions on ensuring the user has all privileges on the database.', 'Retrieving and displaying feedback data from the database The chapter demonstrates retrieving feedback data from a database table and displaying it on a web page, initially using hard-coded data and then looping through an array to display the data in a formatted manner.']}, {'end': 10927.464, 'start': 10668.443, 'title': 'Fetching data from database with php', 'summary': 'Explains how to fetch data from a database using php, including creating a sql query, executing it to retrieve feedback data, and displaying it on a webpage, emphasizing simplicity for beginners.', 'duration': 259.021, 'highlights': ['Creating a SQL query to select all fields from the feedback table and retrieving data from the database using PHP The process involves creating a SQL query to select all fields from the feedback table and using PHP to fetch the data, demonstrating a simple and beginner-friendly approach.', 'Setting variables and handling errors in PHP for data submission on a webpage The tutorial explains setting variables to empty values for name, email, and body, and handling errors using a shorthand method, providing a beginner-friendly approach to data submission.']}, {'end': 11122.723, 'start': 10928.024, 'title': 'Php form validation', 'summary': 'Covers the process of implementing form validation in php, including checking for empty fields, setting error messages, and sanitizing input data using filter_input and filter_var functions.', 'duration': 194.699, 'highlights': ['The chapter covers the process of implementing form validation in PHP, including checking for empty fields, setting error messages, and sanitizing input data using filter_input and filter_var functions.', 'The form validation includes checking for empty fields for name, email, and body, and setting corresponding error messages if the fields are empty.', 'The process of sanitizing input data involves using filter_input and filter_var functions with specific filters such as FILTER_SANITIZE_SPECIAL_CHARS and FILTER_SANITIZE_EMAIL.']}, {'end': 11559.928, 'start': 11123.743, 'title': 'Error handling and form validation with bootstrap', 'summary': 'Demonstrates error handling and form validation using bootstrap classes, showing how to display error messages for empty fields and ensuring no errors before adding form data to the database with php and mysqli.', 'duration': 436.185, 'highlights': ['The chapter demonstrates error handling and form validation using Bootstrap classes. The speaker explains how to utilize Bootstrap classes like is-invalid and invalid-feedback to visually indicate errors in form fields.', "Showing how to display error messages for empty fields. The speaker illustrates using PHP to check for empty fields and show corresponding error messages, such as 'name is required' or 'feedback is required'.", 'Ensuring no errors before adding form data to the database with PHP and MySQLi. The speaker demonstrates using PHP to check for empty error messages before adding form data to the database with MySQLi, and redirects to a feedback page upon successful submission or displays an error message if an issue occurs.']}, {'end': 11735.451, 'start': 11560.629, 'title': 'Php database form tutorial', 'summary': 'Demonstrates how to create a form for adding data to a database using php and mysql, featuring error checking and redirect functionality, with a recommendation to delve into object-oriented programming and explore additional php courses.', 'duration': 174.822, 'highlights': ['The tutorial covers the process of adding data to a database through a form using PHP and MySQL, with error checking functionality and redirection upon successful submission.', 'The instructor encourages viewers to further explore object-oriented programming in PHP for improved code organization and recommends specific courses on Udemy for this purpose.', 'The chapter concludes with a suggestion to explore additional PHP projects, such as a PDO crash course and creating a REST API using vanilla PHP, along with mentioning guest appearances in PHP videos.']}], 'duration': 1431.855, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/BUCiSSyIGGU/pics/BUCiSSyIGGU10303596.jpg', 'highlights': ['Setting up database connection and handling potential connection errors', 'Retrieving and displaying feedback data from the database', 'Creating a SQL query to select all fields from the feedback table and retrieving data from the database using PHP', 'The chapter covers the process of implementing form validation in PHP', 'The chapter demonstrates error handling and form validation using Bootstrap classes', 'Showing how to display error messages for empty fields', 'Ensuring no errors before adding form data to the database with PHP and MySQLi', 'The tutorial covers the process of adding data to a database through a form using PHP and MySQL', 'The instructor encourages viewers to further explore object-oriented programming in PHP', 'The chapter concludes with a suggestion to explore additional PHP projects']}], 'highlights': ['The PHP crash course covers the absolute basics and creates a sandbox with different files focusing on different aspects of PHP, catering to both beginners and those seeking a refresher.', 'A small feedback application will be built, connecting to a MySQL database to add, read, and display feedback, providing practical application of PHP skills.', "Linode, the sponsor, offers a 160-day credit for new users, emphasizing their monthly caps to keep bills predictable and highlighting their control panel's ease of use for project deployment and management.", 'XAMPP is recommended for beginners as it includes PHP, Apache, and MySQL in one installation.', 'WordPress, built on PHP, is popular for its practicality and development speed.', 'Laravel, a powerful PHP framework, is recommended for larger and more customized projects.', "The 'php.ini' file in the ETC folder contains the PHP configuration settings, including the 'display_errors' setting.", "To display errors, the 'display_errors' setting in the 'php.ini' file should be changed from 'off' to 'on'.", 'Covers php basics including variables, arithmetic operations, constants, and arrays', 'Introduction to arrays in PHP, explaining creation using square brackets and array function with practical examples', 'The for loop syntax includes an initializer, a condition, and an increment, allowing code to execute while the condition is met, demonstrated by iterating from 0 to 10 and customizing the start point of the loop.', 'The while loop is shown to execute code as long as the specified condition is met, with an example of iterating from 1 to 15 and the necessity of including an increment to avoid an infinite loop.', "The chapter covers returning values from functions, showcasing the usage of 'return' statement to return the sum of two numbers, storing the return value in a variable, and the concept of return values in functions.", 'The chapter demonstrates the creation of a PHP login system with session management, including the use of session variables, session start function, session destroy, and redirection, resulting in successful login, incorrect login, and session destruction.', 'Covers file handling in php, including reading, writing, and text file creation.', 'PHP has an exception model similar to other languages, allowing exceptions to be thrown and caught within PHP code.', 'Object-oriented programming in PHP consists of classes holding properties and methods.', 'Setting up database connection and handling potential connection errors', 'The chapter covers the process of implementing form validation in PHP', 'The tutorial covers the process of adding data to a database through a form using PHP and MySQLi']}