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);
        break;
}

This keeps giving me  Call to undefined method form::form() in
/usr/local/www/data-dist/form.php on line 38

Line 38 is right after case $temp:

If I have case "temp": error goes away, so I get the feeling case doesn't
like the variable $temp.

Any help would be appreciated. Thanks!

Tom


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.2/422 - Release Date: 8/17/2006
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to