Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は今これを持っています:
$_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;