From the course: PHP Essential Training
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Function arguments - PHP Tutorial
From the course: PHP Essential Training
Function arguments
- [Instructor] In the last movie, we learned how to define and to call functions. In this movie, we'll gain a better understanding of how we go about working with arguments to our functions. Let's create ourselves a new file for this, we're going to open up basic.html, and we'll do save as, and this one is going to be called functions_arguments.php. And then let's change this up here to be functions arguments, and let's start out with just the basic say hello to function that we used in the last movie, which has one argument word, right? So we've already worked with arguments before, we've seen one, here it is. We've defined a variable word that we know we're going to pass a value into it. We pass in the string, everyone to that and that everyone gets assigned to word, and that's what's available for use inside the function then, we already know how that works. I just want to show you a slight revision of that, let's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.