You are here: Re: variable scope problem? « All PHP « IT news, forums, messages
Re: variable scope problem?

Posted by Adam Plocher on 01/20/06 00:04

I believe the problem is that you're trying to access those variables
from within a function. Variables defined in include files should be
accessible to anything after the declaration (think of several include
files as one giant file, in a way). Functions are the only except,
really.

On the first line of your function add:

global $KTPTTopColor, $KTPTBlue, $KTPTRed;

this should allow your global variables to be accessible from within
the function.

 

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

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