anyone any good with AJAX? I need to know how to pass an array back into the presentation layer so i can fill out the form...
Im going from a php function which collects information from mySQL back to my JS to fill out my form.
do i just echo the array?
Matt
You cant pass an array through Ajax. You can send back Strings only - obviously its just a HTTP request despite all the nonsense surrounding it.
Just pass the data back however you want to do it, comma delimited or something.
so build a comma separated string, then pass it backwards with echo?
thanks Sam.
Matt
And I thought you were needing someone to clean the bath :(
Quote from: bytejunkieso build a comma separated string, then pass it backwards with echo?
thanks Sam.
Matt
thats one way, and probably a common one. Or build an XML snippet (OTT IMHO).