Nowdoc syntax 로 PHP를 편하게 코딩하는 방법
======================================
Nowdoc syntax 로 PHP를 편하게 코딩하는 방법
http://stackoverflow.com/questions/5656615/php-sprintf-vs-echo
------------------------------------------------------------
$query = "select * from list where email = 'abc@naver.com' and phone = 'abc'";
------------------------------------------------------------
$query = <<< EOF
select * from list where email = '$n1' and phone = '$n2'
EOF;
------------------------------------------------------------
$query = <<< EOF
SELECT *
FROM `list`
WHERE `email` = '$n1'
AND `phone` = '$n2'
LIMIT 0 , 30
EOF;
------------------------------------------------------------
$query = <<< EOF
SELECT *
FROM `list`
WHERE `email` = 'abc@naver.com'
AND `phone` = 'abc'
LIMIT 0 , 30
EOF;
------------------------------------------------------------
댓글 달기