You are here: Re: Newbie Question « PHP Programming Language « IT news, forums, messages
Re: Newbie Question

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация