hi all,
this is probably an easy one but just wanted confirmation really - I have a array of names that I want to use in an SQL statement so I need each array item to be surrounded by 's
Heres my implode:
Now this code does work ie it returns 'tim','james','bob',etc
but it does not look very clean to me, and as I now need to use this code in a few places wanted some confimation or cleaner suggestions?
Thanks
James
this is probably an easy one but just wanted confirmation really - I have a array of names that I want to use in an SQL statement so I need each array item to be surrounded by 's
Heres my implode:
Code:
$id_string = "'".implode("','", $follow)."'";
Now this code does work ie it returns 'tim','james','bob',etc
but it does not look very clean to me, and as I now need to use this code in a few places wanted some confimation or cleaner suggestions?
Thanks
James