Reply to Re: Clearing Variable and Functions

Your name:

Reply:


Posted by Rik on 05/27/06 05:50

dimo414 wrote:
> I have a script which needs to reset a series of variables several
> times; I have a function setallvar() which first obtains all these
> global variables, then sets them all. It's quite a tedious setup, but
> quite useful to be able to basically unset them all like this. You
> said this is poor form, what would you suggest instead, to mass-set
> variables?

I'no real OO fan, but maybe that's a good answer is this case: create an
object with certain vars, with corresponding functions, and further on
create another object with different vars.

Then again, I'm used to initializing vars. Every variable which is used I
initiliaze somewhere in the script, prior to setting/using it. No chance it
has a wrong value, and an extra security measure, usefull for instace when,
heaven forbid, I'm working on a server with register_globals.

Grtz,
--
Rik Wasmus

[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

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