I have this
$myarr = Array(
0 => "Person.id = PL.id AND AIG.id = PL.key,"
1 => "start_date BETWEEN '$startDate' AND '$endDate'",
2 => "J = 78349",
3 => "text is not null;"
)
I want to implode this array with an AND like
implode("AND", $myarr)
But it doesnt but AND between the 4 elements of array. How would I put an AND between these 4 elements of the 开发者_StackOverflow社区array.
$string = implode(" AND ",$myarr);
that should work fine. It will write the output to $string.
精彩评论