PHP Programing language

How can returning list from the Function
Previous Home Next
In this function using for list and create a list for returning from the function.
<title>Returning list from Functions  </title>
<h1>Returning list from Functions </h1>
list ($first,$second,$third) = create_list (3);
echo "Here the first list,<br>";
echo "$first, $second, $third <br>";
list ($first,$second,$third,$fourth) =
echo "Here the second list,<br>";
echo "$first, $second, $third <br>";
function create_list($number)
for ($loop_counter = 0; $loop_counter 
	< $number; $loop_counter++)
$array[] = $loop_counter;
return $array;


Previous Home Next