note 38364 added to control-structures.switch

From: Date: Thu, 18 Dec 2003 07:25:01 +0000
Subject: note 38364 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-62153@lists.php.net to get a copy of this message
I've been having some problems getting the Switch statement to work - I have a fresh install of Apache 1.3.29 with PHP 4.3.4 and I am not able to get the Switch statement to work at all. For example, if I was to write a page with the following contents: <?php function main() { include("header.html"); echo "Blah blah blah"; include("footer.html"); ) switch($op): default: main(); break; endswitch; ?> Absolutely nothing would be displayed when viewing in a browser. I'm certain it's a problem with the switch statement - if I comment out everything except the contents of the main() function, it displays correctly! Any help would be much appreciated - I've got a nagging feeling that I'm going to kick myself when I found out what the problem is :E ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38364 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38364&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38364&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62153) next »