[PHP] Re: Get fields values from a string.

2003-10-10 Thread Cristian Lavaque
err... sorry, the second line should be $array = explode(':', $string); Cristian Cristian Lavaque wrote: > yup > > you could do something like this > > $string = 'field_value1:field_value2:field_value3'; > $array = explode(':', $str); > foreach($array as $substring){ > list($field, $value) =

[PHP] Re: Get fields values from a string.

2003-10-10 Thread Cristian Lavaque
yup you could do something like this $string = 'field_value1:field_value2:field_value3'; $array = explode(':', $str); foreach($array as $substring){ list($field, $value) = explode('_', $substr); $$field = $value; } hope this helps Cristian Mehdi Achour wrote: > Hi, > > Check this : php.net/e

[PHP] Re: Get fields values from a string.

2003-10-10 Thread Mehdi Achour
Hi, Check this : php.net/explode didou Carles Xavier Munyoz Baldó wrote: Hi, I have a string with the format: "field_value1:field_value2:field_value3" Is there any PHP string manipulation function to extract this values from the string ? Greetings. --- Carles Xavier Munyoz Baldó [EMAIL PROTEC