<?php $str = "[x,y,z]"; $modified = str_replace("[", "[\"", $str); $preg = preg_replace('~\w~', '\"${1}\"', $str); echo $modified; echo $preg;
You have javascript disabled. You will not be able to edit any code.