You are here: Re: dynamically selecting a function « PHP « IT news, forums, messages
Re: dynamically selecting a function

Posted by Norbert Wenzel on 10/04/96 11:23

Thomas wrote:
> Hi there,
>
>
>
> How can I do something like this:
>
>
>
> [snip - theoretical code] if( isset($step) ) echo step.$step() ) [/snip]
>
>
>
> $step would be an int (I would check that before) and then I would have all
> sorts of functions like step1(), step2() . etc.
>
>
>
> Any ideas?
>
>
>
> Thomas

What about switch / case?

switch($step) {
case 1:
step1();
break;
case 2:
step2();
break;
default:
defaultStep();
break;
}

 

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

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