7/31/2010 4:40:57 AM
Title:
Pass Array
Is it possible to pass an array in ActioScript from an HttpService to a php page.
If yes. how to do it?
Help. Thankyou.
7/31/2010 5:08:36 AM
the datatypes are not preserved when sending data using the httpservice in flex. The data is converted to strings. SO you cannot pass an array data type.
7/31/2010 5:11:08 AM
you can send that by converting the array to coma separated values. Say we have an array
arr[0]=10;
arr[1]=20;
arr[2]=30;
send it by converting it to string
arr=10,20,30
and then reconvert the coma separated string in php to array
Inder
Points: 2980
Posts:0
7/31/2010 5:14:20 AM
datatypes are not not exchangeable between different languages so they are not usually preseved.
You can use JSON with flex , check this tutorial to use JSON with flex and PHP to do communication with datatypes preserved
http://www.adobe.com/devnet/flex/articles/flex_php_json.html