The example below shows how to pass multiple variables into a function and how to output those variables.
//variables
$var=”Hello”;
$var2=”World”;
//calling function
my_function($var, $var2);
//function below
//Note that the variable $var is now $my_var and $var2 is now $my_var2
my_function($my_var, $my_var2){
echo $my_var.” “.$my_var2;//Outputs Hello World
}
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton