Ask for a PHP array and string conversion problem. I'm like the next string:
["approval","bbcode","emoji","english","flags","likes","simplified-chinese"]
In addition to using the EXPLODE function to split processing, there is no other way to quickly convert it to an array.
Reply content:
Ask for a PHP array and string conversion problem. I'm like the next string:
["approval","bbcode","emoji","english","flags","likes","simplified-chinese"]
In addition to using the EXPLODE function to split processing, there is no other way to quickly convert it to an array.
$array = json_decode('["approval","bbcode","emoji","english","flags","likes","simplified-chinese"]', true);
You can use regular, but the efficiency should be lower.
$str = '"approval","bbcode","emoji","english","flags","likes","simplified-chinese"';preg_match_all('/\".[^,]*\"/',$str,$out);print_r($out);
You can also write your own C extension, the efficiency should be less than explode poor