|
Posted by Nick Wedd on 01/25/07 12:03
In message <op.tmpjduy3qnv3q9@misant.kabel.utwente.nl>, Rik
<luiheidsgoeroe@hotmail.com> writes
>1. Regular Expression Route:
>
>preg_match_all('/([^!=]+)=([^!=]+)!/',$cookiestring,$matches,PREG_PATTER
>N_ORDER);
>$r = array_combine($matches[1],$matches[2]);
>
>2. Exploding Route:
>
>$values = explode('!',$cookiestring);
>array_walk($values,create_function('$v,$k,&$array','list($key,$value) =
>explode(\'=\',$v);$array[$key] = [$values];));
Great, many thanks to you and to Kimmo Laine!
Nick
--
Nick Wedd nick@maproom.co.uk
Navigation:
[Reply to this message]
|