Re: [PHP] Re: Parse string with variables

2006-05-31 Thread Dimiter Ivanov
On 5/31/06, Barry <[EMAIL PROTECTED]> wrote: Merlin schrieb: > Hi there, > > I am trying to parse a plain text which contains variables. The string > looks like this: > > P=1 > U=test > T=ok > P=2 > U=test2 > T=anything > > How could I create arrays out of this. To be able to access the values >

[PHP] Re: Parse string with variables

2006-05-31 Thread Barry
Merlin schrieb: Hi there, I am trying to parse a plain text which contains variables. The string looks like this: P=1 U=test T=ok P=2 U=test2 T=anything How could I create arrays out of this. To be able to access the values like this: echo $P[1]; parse_str does not work here and I could n

[PHP] RE: parse string

2006-01-18 Thread ET Support
Hi Ron, Not aware of an existing function for that task... but - since it looks like all the value are strictly in quotes (="value") - if you know all the 'var's ahead of time (such as 'carrier') then you could extract the data fairly easily going through the data line by line checking with strpos