- parse_str: documentation ( source)
- print_r: documentation ( source)
- explode: documentation ( source)
- array_walk: documentation ( source)
<?php
$str='prijs=0,209&orderby=price&order=undefined&posts_per_page=undefined';
parse_str($str, $array); //convert $_GET type string into array
// code before this is not needed if using $_GET instead of a string
array_walk($array, function(&$n) {
$n = explode(',', $n);
});
print_r($array);