Page 1 of 1

passing arrays from php(zend) to javascript and back!!

Posted: Thu Nov 20, 2008 1:49 pm
by cali_dotcom
hi,
i'm trying to figure out how to pass arrays back and forth from php to javascript and back in the zend framework. i need to do this for check boxes.
can anyone help me out

Re: passing arrays from php(zend) to javascript and back!!

Posted: Sun Nov 23, 2008 7:36 am
by Darkzaelus
to pass arrays forward to JS, you have to echo them in the correct format in HTML script tags.
to pass arrays back to PHP, if you want to do it over the same page, you have to use AJAX, if you want to allow refreshes, use forms.

Darkzaelus

Re: passing arrays from php(zend) to javascript and back!!

Posted: Sun Nov 23, 2008 10:08 am
by mmj
If you're PHP ver supports it then use json.