Reply to Re: Using variables in Two Function?

Your name:

Reply:


Posted by Jerry Stuckle on 05/22/06 17:00

Barkster wrote:
> I have a page that has two functions on it, on load I check for posted
> value if exists I set some variables that I want to use in the
> functions but don't want to pass back and forth. Do I need to be using
> global variables in order to use this variable in each function? Are
> global variables only available to the page they are called correct?
> Never used them before but I'm not getting the values if I just set a
> $var at the top of the page. Thanks
>

Global variables are like any other variables - only available in that page.

Rather than define them as global, however, you should pass them as parameters
to the functions where they are required.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original 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

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