Created
September 18, 2012 18:43
-
-
Save tlovett1/3744973 to your computer and use it in GitHub Desktop.
Run this code. Example of how parameters work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function test( $test ) { | |
echo $test; | |
} | |
$dang = 'dang'; | |
test( $dang ); | |
test( '123' ); | |
// this program will output: "dang123" | |
// When you call test with a parameter, you can pass any value or any variable in for the parameter and the function will insert the value of that parameter into $test | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment