PHP Return Array
With PHP, you can return a variable or an array from a function. The example below demonstrates how to return a simple array.
$myarray = array('jane','bob','mike','phil');
//The function will make variable called $mytotal which can be returned from the function
$total = people();
//$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, $total, $total and $total.";