Join Kevin Skoglund for an in-depth discussion in this video Function arguments, part of PHP Essential Training.
- [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,…and 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.…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 say that we have another variable here…called "John Doe",…and instead of passing in "Everyone",…we're going to pass in the variable $name.…
- What is PHP?
- Embedding PHP code on a page
- Inserting code comments
- Variables, strings, arrays, and Booleans
- If, else, and elseif statements
- While and for loops
- User-defined functions
- Function arguments and return values
- Debugging and troubleshooting
Skill Level Beginner
MVC Frameworks for Building PHP Web Applicationswith Drew Falkman2h 57m Intermediate
1. PHP Overview
2. First Steps
3. Explore Data Types
4. Control Structures: Logical Expressions
5. Control Structures: Loops
6. User-Defined Functions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.