header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Shridhar Kulkarni
Points:0
Posts:0

2/7/2011 8:29:48 AM

Title: Returning array from PHP and read it in flex


Hello All
I am new to flex I am having following task.

I am using httpService to send userid to PHP and ,when userid is sent the information with respect to that userid will come in the form of array to flex result event.
Now say, my array contain username, location, company name etc.
and I returned that array by sayin "return $userArray"

Now, How I read that array in flex , whenever i alert the resulet event it it is giving null.

Please Help me in flex as well as in PHP side

ThankYou in advance





1
Forbes
Points: 0
Posts:0
2/8/2011 12:50:12 AM



you should first convert the array to comma separated string and then return it to flash.
In flash you can split the comma separated string into array again.

2
FlashBuddy
Points: 0
Posts:0
2/8/2011 8:54:38 AM



when passing data between flash and php the data type should be string , other datatypes are not supported so you are getting null in the result. Array returned cannot be parsed by flash. You can only return string data or variable pairs. I mean to say the loaded data in the request can be either loaded as text or sets of variables.

3
Alex
Points: 0
Posts:0
2/8/2011 9:26:30 AM



Hi Shridhar
Please checkout this following link get the answer to your question.
very useful....
http://codezfun.blogspot.com/2011/02/access-remote-database-from-adobe-air.html


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+3 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions