php - List of objects -


what best method find parent items of comma separated string?

e.g.

array(1,2,3),array("test","123, abc"),1,"abc, 123" 

to get

array(1,2,3) array("test","123, abc") 1 "abc, 123" 

is possible regular expression, or there nifty php function this?

use explode.

$myarray = explode(",",$original); 

this assuming original string, , desired output can iterate through:

$original = 'array(1,2,3),array("test","123, abc"),1,"abc, 123"'; $myarray = explode(",",$original); foreach ($myarray $item) {   echo $item."\n"; } 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -