<?php
$str = "[1,1x,1x,1x][2,2x,2x,2x]";
$arr = ;
preg_replace_callback('/\[(.*?)\]/', function($m) use (&$arr){
$arr[] = explode(',',preg_replace('/([\w]+)/', "[$1]", $m[1]));
}, $str);
print_r($arr);
var_dump($arr);
- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0
- Parse error: syntax error, unexpected ';' in /in/jnQGg on line 4
Process exited with code 255.
preferences:
160.99 ms | 1395 KiB | 24 Q