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
passing arrays from php(zend) to javascript and back!!
Moderator: General Moderators
-
cali_dotcom
- Forum Commoner
- Posts: 49
- Joined: Fri Aug 22, 2008 7:28 pm
- Location: Rancho Cucamonga, CA
-
Darkzaelus
- Forum Commoner
- Posts: 94
- Joined: Tue Sep 09, 2008 7:02 am
Re: passing arrays from php(zend) to javascript and back!!
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
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!!
If you're PHP ver supports it then use json.