|
Posted by Rik on 01/25/07 18:23
On Thu, 25 Jan 2007 18:10:45 +0100, Michael Fesser <netizen@gmx.de> wrot=
e:
> .oO(Nick Wedd)
>
>> I have a string, $cookiestring, which typically looks like this:
>> "us=3D1!uk=3D2!de=3D13!fr=3D8!". I want to use this to get values in=
to an array
>> $r, so that $r['us']=3D1, $r['uk']=3D2, etc.
>
> Another one:
>
> parse_str(strtr($cookiestring, array('!' =3D> '&')), $r);
>
D'oh! Nice one.
I thought about parse_str(), but then decided it couldn't be used becaus=
e =
of the '!'... The simple solution of replacing them just wouldn't op int=
o =
my head :)
-- =
Rik Wasmus
* I'm testing several new newsreaders at the moment. Please excuse =
possible errors and weird content. *
Navigation:
[Reply to this message]
|