RE: [PHP] Problem with functions
| From: | Carlos Alberto Pinto Hurtado | Date: | Thu, 05 Dec 2002 15:58:51 +0000 |
| Subject: | RE: [PHP] Problem with functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-127163@lists.php.net to get a copy of this message | ||
<?
$username = "victor";
function test() {
echo $GLOBALS[$username];
?>
Carlos Alberto Pinto Hurtado
IT ICA
(57 1) 2322181
(57 1) 2324698
Movil.(57 3) 310 6184251
-----Mensaje original-----
De: Victor Halla [mailto:victorhalla@yahoo.com]
Enviado el: Wednesday, December 04, 2002 6:16 PM
Para: php-general@lists.php.net
Asunto: [PHP] Problem with functions
Hi,
I have de following code for example
<?php
$username = "victor";
function test() {
echo $username;
}
?>
If I call the funcion test(), echo print nothing.... what's is going on ?
[]´s
victorhalla@yahoo.com
__________________________________________________________________ Victor
Halla ICQ#: 114575440 Current ICQ status: + More ways to contact me
__________________________________________________________________
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php