我现在有这个:
$_words = "'".implode("','", $array_of_words)."'";
这给了我一个像这样的字符串:
'word','word2','word3'
我怎样才能修改它以获得
"word","word2","word3"
谢谢
只是交换你的报价
$_words = '"'.implode('","', $array_of_words).'"';
$result=array();
foreach ($array_of_words as $a1) {
$result[]='"'.$a1.'"';
}
$_words = implode( ',', $result );
echo $_words;
$_words = implode( "','", $array_of_words );