I'm trying to use here docs within a switch to output html. The code
below works (i.e. prints a Foo1 headline below my tab graphic) but if I
take out the comments and use the entire switch statement I get a parse
error. I've tried to simplify it down to the bones but can't get it much
simpler than this...
Can anybody spot my error?
thx,
wmc.
<?php
echo '<img border="0" src="images/tab' . $qstring . '.gif" width="570"
height="40" alt="" usemap="#mapTab s" />';
echo "\n<map name=\"mapTabs\ ">";
switch($qstring ) {
case '1':
$content1 = <<< END1
<h1>Foo 1</h1>
END1;
echo $content1;
break;
/*
case '2':
$content2 = <<< END2
<h1>Foo 2</h1>
END2;
echo $content2;
break;
case '3':
$content3 = <<< END3
<h1>Foo 3</h1>
END3;
echo $content3;
break;
*/
}
?>
Comment