no, that is not how it should be

<?
$txt = "text";

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

?>




From: "H. J. Wils" <[EMAIL PROTECTED]>
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


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



Reply via email to