Jump to content


Photo

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


  • Please log in to reply
2 replies to this topic

#1 ridiculous

ridiculous
  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 13 October 2006 - 05:06 AM

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.




------------------------------------------------------
<code>

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

{
$conn = db_connect();

$jobdetails = mysql_query("SELECT title, description, required
FROM jobs WHERE
title='$title' and
location='$location' and
date='$date'")


$numofrows = mysql_num_rows($jobdetails);    ///////<-----the error references this line.
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>
  HTML;

    echo "</tr>";
}



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

</code>
-------------------------------------------------------------

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

#2 Jeremysr

Jeremysr
  • Members
  • PipPipPip
  • Advanced Member
  • 199 posts
  • LocationSaskatchewan, Canada

Posted 13 October 2006 - 05:36 AM

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.

#3 ridiculous

ridiculous
  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 13 October 2006 - 05:39 AM

Lord Ahmightay. Bless you son, bless you.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users