note 114394 deleted from functions.returning-values by sobak
| From: | sobak@php.net | Date: | Sat, 19 Nov 2016 07:32:52 +0000 |
| Subject: | note 114394 deleted from functions.returning-values by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207197@lists.php.net to get a copy of this message | ||
Note Submitter: ahmad at myandmyhost dot comze dot com
----
we can return array using foreach
<?php
function my_func2()
{
return array("Name"=>"Ahmad
Sayeed","Email"=>"ahmad@gmail.com");
}
$ar = my_func2();
foreach($ar as $key=>$value)
{echo $key." , ".$value,"<br />";}
?>