|
Posted by Geoff Muldoon on 08/20/07 01:13
<1187571873.248314.29230@i38g2000prf.googlegroups.com>, says...
> Here is the code I tried:
>
> <?php
> switch($_REQUEST['p']) {
> case 'page1': echo "page 1"
> break;
> case 'page2': echo "page 2"
> break;
> default: echo "index"
> break;
> }
>
> ?>
>
> I access the code by typing in domain.com/index.php?p=page1
>
> It then returns:
>
> Parse error: syntax error, unexpected T_BREAK, expecting ',' or ';' on
> line 4
Semicolons are needed at the end of each of your echo statements.
GM
Navigation:
[Reply to this message]
|