You are here: Re: global variable in function « PHP Programming Language « IT news, forums, messages
Re: global variable in function

Posted by Andy Hassall on 05/14/05 20:00

On Sat, 14 May 2005 17:48:29 +0100, Geoff Berrow <blthecat@ckdog.co.uk> wrote:

>I noticed that Message-ID: <hf8c81h348758kvt6864vpc8lp5otl7n5g@4ax.com>
>from Andy Hassall contained the following:
>
>><?php
>>$myvariable = 'x';
>>echo $myvariable;
>>
>>function f()
>>{
>> global $myvariable;
>> echo $myvariable;
>>}
>>?>
>
>and of course you'll have to call the function.

Hm, yes, that's a good idea ;-)

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация