I have a problem with this:
<?php $url = 'aa=bb&cc=dd&ee=ff';
For something like this:
<?php $url = array('aa' => 'bb', 'cc' => 'dd', 'ee' => 'ff');
My code:
<?php
$url = 'aa=bb&cc=dd&ee=ff';
preg_match_all('[(\w+)=(\w+)]', $url, $matches);
var_export($matches);
Result:
array ( 0 => array ( 0 => 'aa=bb', 1 => 'cc=dd', 2 => 'ee=ff', ), 1 => array ( 0 => 'aa', 1 => 'cc', 2 => 'ee', ), 2 => array ( 0 => 'bb', 1 => 'dd', 2 => 'ff', ), )
It's almost okay, I just want to get rid of this first key. Thank you for your help.