How can I add quotation marks in this php script?

  • Thread starter Thread starter 123456789
  • Start date Start date
1

123456789

Guest
I want the results that are DISPLAYED for $find to have quotation marks, but I cant seem to do it without messing up the syntax.

Currently returns: John
Need it to return "John"

$anymatches=mysql_num_rows($data);
if ($anymatches == 0)
{
echo "Sorry, there is no Ex-Brief for <b>$find</b> yet
Please try again.<br><br>";
}

}
 
You have to escape the quotation marks..

echo "Sorry, there is no Ex-Brief for <b>\"$find\"</b> yet
Please try again.<br><br>";
 
Back
Top