0
我有爆這樣的代碼:破滅陣列PHP
$date_condition = implode(" AND a.date = ",$date_interval);
該數組是這樣的:
$date_interval = Array('2017-01-24','2017-01-25','2017-01-26');
這是我想要有望成爲輸出什麼:
$date_condition = "'2017-01-24' AND a.date = '2017-01-25' AND a.date = '2017-01-26' ";
但是從我的代碼我嘗試我只是得到這樣的輸出:
$date_condition = "2017-01-24 AND a.date = 2017-01-25 AND a.date = 2017-01-26";
我該怎麼做?
謝謝。
的複製[此](http://stackoverflow.com/questions/10490860/php-implode-but-wrap-each-element-in-引用)所以問題? –
[PHP內部爆發但是在引號中包裹每個元素]的可能重複(http://stackoverflow.com/questions/10490860/php-implode-but-wrap-each-element-in-quotes) – Xorifelse