I have a string abc@123 (hello world) posted 23 July 1990 20:34:00 +000. I want output as hello world abc (abc@123) posted "on" 23 July 1990 "at" 20:34:00 Should it be done with explode or preg() function??
I have a string abc@123 (hello world) posted 23 July 1990 20:34:00 +000 .
Share
I’d use a regex with
preg_replace, here is an example that can likely be improved upon:Output:
Demo