PHP Integrating PHP with Databases Filtering Input for Queries Accounting for Empty Results

Matt Nickolls
Matt Nickolls
5,369 Points

escape quotes query

Hi all

I can't get my head around how the escape sequence for :

"Search Results for \"".htmlspecialchars($search)."\"";

results in output of:

Results in Search results for "search term".

Wouldn't it be :

"Search Results for "\".htmlspecialchars($search)."\"";

Or ;

"Search Results for \"".htmlspecialchars($search)."\"";

I'm confused!

Thanks

Matt