ID: 13387 Updated by: yohgaki Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: Scripting Engine problem Operating System: Mandrake Linux PHP Version: 4.0.5 New Comment:
I don't have problem with 4.2.0-dev, I guess it is fixed. Please reopen if problem remains. Previous Comments: ------------------------------------------------------------------------ [2001-09-22 08:43:39] [EMAIL PROTECTED] Description: The parser chokes on the first case in switch statment if the switch and case statements are separately script-delimited. Error message: Parse error: parse error, expecting `T_CASE' or `T_DEFAULT' or `'}'' Example: <? switch( $item["type"] ) { ?> <? case "copy": ?> <- CHOKES ON THIS LINE <?= $item["copy"] ?><br> <? break; ?> <? case "tidbit": ?> <? $item["tidbit"]->WriteHTML(); ?> <? break; ?> ... <? } ?> Removing the ?> <? between the switch and first case, like this, works: <? switch( $item["type"] ) { case "copy": ?> <?= $item["copy"] ?><br> <? break; ?> <? case "tidbit": ?> <? $item["tidbit"]->WriteHTML(); ?> <? break; ?> ... <? } ?> Thanks, you guys rock! ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13387&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]