嗨,我想在变量之后/之前添加“”。
代码:
<?php
while (false !== ($entry = readdir($handle))) {
$entry = "$entry";
$patterns = array();
$patterns[0] = '/.swf/';
$replacements = array();
$replacements[0] = ',';
echo preg_replace($patterns, $replacements, $entry);
}
?>
回声
word1,word2,word3,etc
我希望它回显:“word1”,“word2”,“word3”等,而不是你怎么做?