Re: cannot access inc files from a function
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: cannot access inc files from a function

From: Jasen Betts <jasen-b@free.net.nospam.nz>
Date: Tue Aug 16 2005 - 13:14:27 CEST

> But it doen't print the content from $charcoal, $oil or, etc.
> Do I have to declare the function global or something like that. In
> that case, how should I do it??
> Many thanks. Bettina
>

to combine some of the ideas in this thread...
replace the whole case block with:

 echo $GLOBAL[array('C'=>'charcoal','O'=>'oil','A'=>'acrylic')[$technique]];
  

Bye.
   Jasen
Received on Mon Oct 24 02:09:24 2005