Possible Duplicate:
What is the name for the “<<<” operator?
I've just seen this code on this website:
PHP for Beginners: Building Your First Simple CMS
The code is:
private function buildDB() {
$sql = <<<MySQL_QUERY
CREATE TABLE IF NOT EXISTS testDB (
title VARCHAR(150),
bodytext TEXT,
created VARCHAR(100)
)
MySQL_QUERY;
return mysql_query($sql);
}
I've search high and low for this operand "<<<" but I can't seem to find the documentation anywhere!
If this operand is real I would like to know how it works because writing SQL queries like this makes code much more readable and would make SQL bugs simpler to find!
Might i add that i tried this code and got a compile error:
Parse error: syntax error, unexpected $end in C:\Users\Alex Morley-Finch\Dropbox\Shared\Projects\htdocs\test\php\database.php on line 121