Have you tried using HTTPService to transfer data between Flex and PHP? I find it easier than URLVariable and you can solve the html-text problem by using POST with this. Another option could be to use AMFPHP or WebORB for PHP to transfer data. Both use remoting which is very efficient and handle all the data serialization for you.
I would definatly look into AMFPHP. works great with flex
u can convert the array in to a string in FLEX and in PHP u can use the "split" command...
here s sample program see if it helps u
similary u can transfer VARIABLES also,in the place of the string just put ur variable on the PHP use t variable without spliting t
as said above you should take a look at AMF, although I use Zend AMF
forget name/value pairs or xml nonsense. Just pass arrays of objects as arraycollections
you call PHP methods as easily as you would methods in an actionscript class.
I only recently started using AMF and I'm well impressed on how straightforward it is. It also sends using binary data and with no xml overheads it makes it faster and less bandwidth. Especially useful for mobile apps