3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'prijs=0,209&orderby=price&order=undefined&posts_per_page=undefined'; $array = preg_split('/[&]/' , $str); $filters = array(); foreach ($array as $a) { $values = preg_split('/[=]/' , $a); $key = values[0]; $filters[$key][] = preg_split('/[,]/' , $values[1]); } var_dump($array);

preferences:
35.84 ms | 402 KiB | 5 Q