我有字符串$text = " /var/www/images/mobile/test/test/, 1346744549";
,我需要将其转换为$text = " '/var/www/images/mobile/test/test/', '1346744549'";
- 将'添加到字符串中的每个“值”。斜线出现问题,我不知道如何识别它。这是我的样本,但它已经错了......
$text = " /var/www/images/mobile/test/test/, 1346744549";
$text = preg_replace("/\b|\/\b/i", '"', $text);
echo $text;