This is my script:
Code:
<?php
@require "includes/connect.php";
$search = $_POST['search'];
$explode = explode(" ", $search);
$search = "biz_name LIKE '%" . implode("%' OR biz_name LIKE '%", $explode) . "%'";
$count = count($explode);
$query = array();
for ($i=0, $i < $count, $i++){
$query[$i] = mysql_query("SELECT * FROM businesses WHERE $search");
}
echo "<p><strong style=\"font-size: 13px;\">Standard listings</strong></p>";
if (@mysql_num_rows($result) == 0) {
echo "There are currently no listings for this category.";
}
while (@$row = mysql_fetch_assoc($result)) {
$row['biz_description'] = str_replace("\n", "\n<br />", $row['biz_description']);
echo "<p style=\"padding: 10px; border: 1px dashed #C4C4C4; width: 96%;\"><a href=\"http://".$row['biz_website']."\" onclick=\"window.open(this.href,'_blank');return false;\"><strong>".$row['biz_name']."</strong> - <em>".$row['biz_website']."</em></a><br />";
echo $row['biz_description'];
echo "</p>";
}
?>
i get this error:
Quote:
|
Parse error: parse error, expecting `';'' in search.php on line 51
|
line 51 is within that script but i cannot find it. What the script does is when a user searchs for example 'Webmaster Forum' it will split it into biz_name like 'webmaster' or biz_name like 'forum'.
any help fixing this will be appreciated.