I have this right now:
$_words = "'".implode("','", $array_of_words)."'";
Which gives me a string like:
'word','word2','word3'
How can I modify that to get
"word","word2","word3"
Thanks
I have this right now:
$_words = "'".implode("','", $array_of_words)."'";
Which gives me a string like:
'word','word2','word3'
How can I modify that to get
"word","word2","word3"
Thanks
Just swap your quotes
$_words = '"'.implode('","', $array_of_words).'"';
'word","word2","word3'
–
Doridoria $result=array();
foreach ($array_of_words as $a1) {
$result[]='"'.$a1.'"';
}
$_words = implode( ',', $result );
echo $_words;
$_words = implode( "','", $array_of_words );
© 2022 - 2024 — McMap. All rights reserved.