actionscript 3 - Convert PHP Explode String to AS3 -



actionscript 3 - Convert PHP Explode String to AS3 -

how convert form php as3?

$arr = explode(" | ", $str); foreach($arr $item) { $arr2 = explode(": ", $item); $finalarray[$arr2[0]] = $arr2[1]; }

the function turn string array:

title: murk | tags: hello | nachr: lorem | quelle: ipsum |

thanks

it won't associative array, can object. like:

var str:string = "title: murk | tags: hello | nachr: lorem | quelle: ipsum"; var arr:array = str.split(" | "); var obj:object = new object(); each (var s:string in arr) { var a:array = s.split(": "); obj[a[0]] = a[1]; } trace(obj.title); // murk

php actionscript-3

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -