I'm a beginner and this is my class assignment.
PHP reports the following error when tried to run the program,
Parse error: syntax error, unexpected T_IF in C:\xampp\htdocs \untitled.php on line 118.
How do I debug the error?
Here's a snippet of the code:
<p> </p>
<table width="800" border="1" align="center" bordercolor="#0 00000">
<tr bgcolor="#DD355 7">
<th colspan="2" class="style12" scope="col">And our comments for this conversion are as follow: </th>
</tr>
<tr>
<td width="50%"><sp an class="style27" >Great than or equal <?= $greaterthanore qual ?> </span></td>
<td width="50%">
<?=
LINE 118 --> if ($conversion >= $greaterthanore qual)
{
echo "<font color=#FF0000>$ comment1</font>";
}
else
{
echo "$comment1" ;
}
?>
</td>
</tr>
<tr>
<td><span class="style27" >Between <?= $between1 ?> to <?= $betweeen2 ?> </span></td>
<td>
<?=
if(($conversion >= $between1) and ($converted <= $between2))
{
echo "<font color=#FF0000>$ comment2</font>";
}
else
{
echo "$comment2" ;
}
?>
</td>
</tr>
<tr>
<td><span class="style27" >Less than or equal <?= $lessthanorequa l ?></span></td>
<td>
<?=
if($conversion <= $lessthanorequa l)
{
echo "<font color=#FF0000>$ comment3</font>";
}
else
{
echo "$comment3" ;
}
?>
</td>
</tr>
</table>
PHP reports the following error when tried to run the program,
Parse error: syntax error, unexpected T_IF in C:\xampp\htdocs \untitled.php on line 118.
How do I debug the error?
Here's a snippet of the code:
<p> </p>
<table width="800" border="1" align="center" bordercolor="#0 00000">
<tr bgcolor="#DD355 7">
<th colspan="2" class="style12" scope="col">And our comments for this conversion are as follow: </th>
</tr>
<tr>
<td width="50%"><sp an class="style27" >Great than or equal <?= $greaterthanore qual ?> </span></td>
<td width="50%">
<?=
LINE 118 --> if ($conversion >= $greaterthanore qual)
{
echo "<font color=#FF0000>$ comment1</font>";
}
else
{
echo "$comment1" ;
}
?>
</td>
</tr>
<tr>
<td><span class="style27" >Between <?= $between1 ?> to <?= $betweeen2 ?> </span></td>
<td>
<?=
if(($conversion >= $between1) and ($converted <= $between2))
{
echo "<font color=#FF0000>$ comment2</font>";
}
else
{
echo "$comment2" ;
}
?>
</td>
</tr>
<tr>
<td><span class="style27" >Less than or equal <?= $lessthanorequa l ?></span></td>
<td>
<?=
if($conversion <= $lessthanorequa l)
{
echo "<font color=#FF0000>$ comment3</font>";
}
else
{
echo "$comment3" ;
}
?>
</td>
</tr>
</table>
Comment