Diodeus wrote:
> Create some sort of unique delimiter in your response data string to
> separate the elements, such as "~".

You could do that, but then you're limiting yourself (limiting yourself to just
arrays and what data can be in those arrays). Why not just use JSON? Convert
your PHP structure (array or hash) into a JSON string and then send it over the
wire.

> Then turn the string into an array using (use your own variable
> names):
> 
> mydata = myResponseText.Split('"~")
> 
> mydata[0] will contain the first element, mydata[1] the second etc.

This would then become

  mydata = myResponseText.evalJSON();

-- 
Michael Peters
Developer
Plus Three, LP


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to