Re: help with PHP global array
| From: | Julio Nobrega Trabalhando | Date: | Thu, 07 Feb 2002 16:00:54 +0000 |
| Subject: | Re: help with PHP global array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83860@lists.php.net to get a copy of this message | ||
$array = Array('a'=>1);
function scope_test()
{
global $array;
echo $array['a'];
}
Works for me, PHP 4.1.1 with the new .ini file.
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"Wee Chua" <Chua@mail.interclean.com> wrote in message
news:C823AC1DB499D511BB7C00B0D0F0574C08F2BF@serverdell2200.interclean.com...
> Hi all,
> How can I declare a global array? Can I do this:
> $global myArray[]
>
> would I find out it is an array when I use it in other places?
>
> Thanks,
> Wee