Hi there,
I've an array $array[] in a php file and would like to send it to flash with all its contents.
How can I do so please?
Thanks for your help.
War_Angel
Printable View
Hi there,
I've an array $array[] in a php file and would like to send it to flash with all its contents.
How can I do so please?
Thanks for your help.
War_Angel
Hi,
if there is a character that would not occur in the data (e.g a | bar), you could use
print "myArray=" . implode($array, "|");
Of course this only covers plain arrays - php arrays can have both text indices (like an actionscript object) and structured elements
Musicman
...and the flash side of that would be
asArray = myArray.split("|");
note:
Although php supports delimiters (the pipe or other character you want to divide your array items with) of more than one characters, flash doesn't, you can only 'split' with single characters. This is one the more infuriating limitations of flash, because a traditional delimiter in flatfile (text) databases is the || (a double-pipe) and this simply isn't possible in flash.
cheers!
LuxFX