Is there a PHP function which can add single quotes around each item
in a list?
So if I have:
$myList = "michael,frank, peter,sally,jun e";
What I want to end up with is:
$myList = "'michael','fra nk','peter','sa lly','june'";
I know I can loop over the list and do it manually, I was wondering if
there was a cool function to do it automatically.
I want to add this to the "IN" part of a database "WHERE" clause.
Thanks in advance
in a list?
So if I have:
$myList = "michael,frank, peter,sally,jun e";
What I want to end up with is:
$myList = "'michael','fra nk','peter','sa lly','june'";
I know I can loop over the list and do it manually, I was wondering if
there was a cool function to do it automatically.
I want to add this to the "IN" part of a database "WHERE" clause.
Thanks in advance
Comment