...

View Full Version : syntax error, unexpected ';'



jarv
05-26-2011, 01:03 PM
$mail->MsgHTML("<table>";
"<thead style=\"backgorund-color:#000; color:#fff;\">";
"<th>Session Date</th>";
"<th>Start</th>";
"<th>Finish</th>";
"<th>Pallant Session Type</th>";
"<th>Price</th>";
"<th>Doctor</th>";
"</thead>";
"<tbody>";
for($k=0;$k<$show_newbookingscount;$k++){
"<tr>";
"<td>$show_datebooking[$k]</td>";
"<td>$show_starttime[$k]</td>";
"<td>$show_finishtime[$k]</td>";
"<td>$show_sessiontype[$k]</td>";
"<td>$show_cost[$k]</td>";
"<td></td>";
"</tr>";
}
"</tbody>";
"</table>");


Why? what's wrong?

abduraooft
05-26-2011, 01:13 PM
That should be something like

$str="<table>
<thead style=\"backgorund-color:#000; color:#fff;\">
<th>Session Date</th>
<th>Start</th>
<th>Finish</th>
<th>Pallant Session Type</th>
<th>Price</th>
<th>Doctor</th>
</thead>
<tbody>";
for($k=0;$k<$show_newbookingscount;$k++){
$str.="<tr>
<td>$show_datebooking[$k]</td>
<td>$show_starttime[$k]</td>
<td>$show_finishtime[$k]</td>
<td>$show_sessiontype[$k]</td>
<td>$show_cost[$k]</td>
<td></td>
</tr>";
}

$str.="</tbody>
</table>";

$mail->MsgHTML($str);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum