Jump to content


This topic is now archived and is closed to further replies.


[Resolved/Thank You!!!]: parse error, unexpected T_VARIABLE

Recommended Posts

[color=blue]I've been trying to find out the cause of this error and don't have a clue. Its probably quite simple for someone more experience to seek and destroy.[/color]


function get_job_details_table($title,$location,$date)

$conn = db_connect();

$jobdetails = mysql_query("SELECT title, description, required
title='$title' and
location='$location' and

[color=green]$numofrows = mysql_num_rows($jobdetails);    ///////<-----the error references this line. [/color]
echo "<div id='detailsdiv'>";
echo "<table width='493 px' height= '400 px' align = 'center' border='1' cellpadding='3' cellspacing='3'>";

for($i = 0; $i < $numofrows; $i++) {
    $row = mysql_fetch_array($jobdetails); //get a row from our result set
    if($i % 2) { //this means if there is a remainder

echo "<tr bgcolor='#ddd8dc'>";
} else {

echo "<tr bgcolor='#feaae9'>";
echo <<HTML
<td align=left>{$row['title']}</td>
<td align=left>{$row['description']}</td>
<td align=center>{$row['required']}</td>

    echo "</tr>";

echo "</TABLE>";
echo "</div>";


Any help on this would be killer. Also, if its simple...I sure would like to know how went about solving the problem.

Share this post

Link to post
Share on other sites
I think you need a semi-colon right at the end of the line above the one you said the error was on. The date='$date' line.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.