0; if ($intHasQuery) { $strQuery = preg_replace("/[^A-Za-z0-9]/", "", $strQuery); $varPosts = $c->query( "SELECT * from posts as p where content like concat('%', ?, '%') order by created desc", $strQuery); $i = 0; for ($i = 0; $i < count($varPosts); $i++) { $varOld = $varPosts[$i]; $varOld["content"] = preg_replace("/\b({$strQuery})\b/i", "$1", $varOld["content"]); $varPosts[$i] = $varOld; } } ?>