RE: [PHP-DB] global var
| From: | Bastien Koert | Date: | Tue, 15 Mar 2005 18:50:07 +0000 |
| Subject: | RE: [PHP-DB] global var | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38915@lists.php.net to get a copy of this message | ||
no, that is not how it should be
<?
$txt = "text";
function echo_txt()
{
global $txt;
echo $txt;
}
?>
From: "H. J. Wils" <double_u1@hotmail.com> To: php-db@lists.php.net Subject: [PHP-DB] 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