RobDog888
Feb 15th, 2008, 04:31 AM
I need to replace a space delimited string in a db query with apostrophy comma apostrophy.
I have this but it pukes.
preg_replace('/ /', '', '', $myvar['keywords'])
Basically its ....
item1 item2 item3
And should be ...
item1', 'item2', 'item3
as I can easily wrap the external apostrophies around the result to make...
'item1', 'item2', 'item3'
What escape sequence do I need if any?
Thanks
I have this but it pukes.
preg_replace('/ /', '', '', $myvar['keywords'])
Basically its ....
item1 item2 item3
And should be ...
item1', 'item2', 'item3
as I can easily wrap the external apostrophies around the result to make...
'item1', 'item2', 'item3'
What escape sequence do I need if any?
Thanks