Re: global
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: global

From: Andy Hassall <andy@andyh.co.uk>
Date: Wed Jun 29 2005 - 22:38:50 CEST

On Wed, 29 Jun 2005 20:35:18 +0000 (UTC), mark <mark@something.com> wrote:

>$myvar = "test";
>
>function myfunc() {
>global $myvar;
>echo $myvar;
>}
>
>However, when echoing $myvar it is blank. Can anybody tell me what I am
>doing wrong?

 Post a runnable piece of code that demonstrates the problem - the one you just
posted does not call the function.

-- 
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Mon Oct 17 20:59:23 2005