PDA

View Full Version : [SOLVED] PHP Parse error!



Rytron
May 20th, 2008, 09:34 PM
Hi,

I get this error

Parse error: parse error, unexpected '}', expecting ',' or ';' in C:\wamp\www\-php\PHP-4-If Else Statements.php on line 8



Here is the php:


<?php

$first=30;

$second=40;

$third=50;

if ($first<$second)

{echo"this is true"}

else

{echo"this is false"}

/*

if ($first==$second)

{echo"this is true"}

else

{echo"this is false"}

*/

/*

if ($first!=$second)

{echo"this is true"}

else

{echo"this is false"}

*/

?>


What is wrong with this code?

Thanks.

grepgav
May 20th, 2008, 09:40 PM
put semicolons after the echo statements.

EX:

echo "Hello, World";

you are closing the {} without terminating the echo statement.