Hello,
Would anyone know if it's possible to have dynamic case statements?
For example.
Theform = new form();
$temp = $_POST['var1'];
switch ($temp) {
case "status":
$theform->status();
break;
case $temp:
$theform->form($temp);
On Fri, August 18, 2006 11:58 am, Tom Cruickshank wrote:
> Would anyone know if it's possible to have dynamic case
> statements?
Almost for sure...
I *know* you can use switch(true) and put *ANY* expression you want
for a case.
switch (true) {
case $temp === 'status':
$theform->status(
2 matches
Mail list logo