Reply to Re: Eval, Variable Variables problem

Your name:

Reply:


Posted by Michael Fesser on 01/03/07 21:05

..oO(Ted)

>I have a small pre-determined number of possible values for a variable, and
>I would like to set a value for the corresponding 'switch type' variable.
>
>For example, if $x is 14, I want to execute the following statement:
> $switch_14 = "on";
>
>In general, I want something like this:
> $switch_.$x = "on";

You're looking for an array:

$switch[$x] = TRUE;

Micha

[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

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