Pahlevanzadeh Mohsen wrote:
Dears,We can introduce a external variable to our
function with GLOBAL reserved word.same following :
<?
$n=3
function nn()
{
global $n;
echo $n;
}//end of func
?>
But i need to introduce a array.Name of my array is
month.
I typed "global $month;".But it didn't work.
Please guide me until i can use an external array.
Yours,Mohsen.
It works, you have error somewhere else:
<?
$month= array('January', 'February', 'March');
function nn()
{
global $month;
echo $month[0];
}
nn();
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php