|
Posted by Lorenzo Bettini on 03/27/07 12:16
Christoph Burschka wrote:
>
> global $n;
> $n="hello";
> g();
>
> function g()
> {
> global $n;
> echo $n;
> }
>
otherwise you might use constants (of course, if that variable value
must not be changed) which are already available in function scopes...
--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Navigation:
[Reply to this message]
|