We will write our code like:
instead of using concatenation-dot syntax such as:
$db->query(
"CREATE TABLE IF NOT EXISTS `users ` ( "
. "`id` int NOT NULL AUTO_INCREMENT, "
. "`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, "
. "`usr` varchar(255) COLLATE utf8_unicode_ci NOT NULL, "
. "`pwd` varchar(255) COLLATE utf8_unicode_ci NOT NULL, "
. "PRIMARY KEY (`id`) "
.");"
);
Related topic StackOverflowHeredoc reference here
No comments:
Post a Comment