Let’s suppose I have a string like this
$str = "this is my string";
I need a regular expression in order to have
$str = "'this','is','my','string'";
I know that with this one
preg_match_all("#\w+#",$str,$mth);
I can get an array with single words but I’m not able to reach my goal.
Thanks in advance.
No regular expressions needed.