fast answer :
1) the actual string litteral delimitor in SQL AND in PHP is the single quote.
example 'this is a test phrase'
PHP admits two other ways (and perhaps more, see "types and constants" and "expressions" in PHP manual, top sections at
www.php.net/manual/en/ )
"this is a $variable phrase" which will produce the same result if echoed if you state ***beforehand*** that
$variable='test';
(note the single quotes)
other possibility (my favourite, also to be found at the forementioned web pages)
echo<<<MARKER
this is a $variable phrase<br>
and a very<br>
long string that can span an entire script<br><hr>
that's the way I transform a HTML static page to a PHP dynamic one because <br>
replacing variables by their $values is easy even for array, matrix or session/get/post {$_SESSION['somevar']}<br>
the onyl bad case are the constants that can not be "expanded"
you can mix 'all' kind of "quotes" or escaped stuff\"toto"youpie\" in there.
MARKER;
MARKER can be almost any string you like ; usually rather shorter : EOS (end-of-string), EOR (repeat), BB, EOT (table) those are just mnemonics)
So my comment about "idiotic" means that :
- single quotes are fast. they don't enable "variable expansion" (or "replacement with values")
- double quotes do allow such expansion, and are thus slower.
- using double quotes with a litteral (ie, no variables to expand) is idiotic.
ok ?
single quotes ar ethe rule, double are the exception.
2) single quote is THE string delimitor in SQL, and the ONLYone. SQL is a standardized ISO language. You've no choice.