Thanks !!!

Victor
"Tom Rogers" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Thursday, December 5, 2002, 9:15:53 AM, you wrote:
> VH> Hi,
>
> VH> I have de following code for example
>
>
> VH> <?php
>
> VH> $username = "victor";
>
>
> VH> function test() {
> VH>     echo $username;
> VH> }
>
> ?>>
>
> VH> If  I call the funcion test(), echo print nothing.... what's is going
on ?
>
> VH> []īs
>
> VH> [EMAIL PROTECTED]
>
>
>
> VH> __________________________________________________________________
Victor
> VH> Halla ICQ#: 114575440 Current ICQ status: + More ways to contact me
> VH> __________________________________________________________________
>
>
>
>
> You need to tell the function to use the global variable like so:
>
>
> function test() {
>     global $username;
>     echo $username;
> }
>
> --
> regards,
> Tom
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to