Re: global var

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sorry, thats the way i meant it...

i have it that way, but it doesnt work...


----- Original Message ----- From: "Bastien Koert" <bastien_k@xxxxxxxxxxx>
To: <double_u1@xxxxxxxxxxx>; <php-db@xxxxxxxxxxxxx>
Sent: Tuesday, March 15, 2005 7:50 PM
Subject: RE: global var



no, that is not how it should be

<?
$txt = "text";

function echo_txt()
{
 global $txt;
 echo $txt;
}

?>




From: "H. J. Wils" <double_u1@xxxxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject:  global var
Date: Tue, 15 Mar 2005 18:38:13 +0000

Hi,

I want to use a global var, but it doesnt seem to work.

This how it should be right?

<?
$txt = "text";

function echo_txt()
{
  global $txt;
  echo $global;
}

?>

but it doesnt work...

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


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



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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux