With PHP, you can return a variable or an array from a function. The example below demonstrates how to return a simple array.
//The function will make variable called $mytotal which can be returned from the function
$total = people();
echo “<br/><br/>”;
//$total is setting the variable equal to the function
//The value $mytotal is returned and is printed below
echo “The array are the people $total[0], $total[1], $total[2] and $total[3].”;
?>
© 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