So I'm passing an array to my javascript via php via ajax.
Here is the array that's been passed in.
PHP:
when i access
Javascript:
it says undefined.
EDIT: I accidentaly put a dollar sign in front of array[0]['Consultant'] when I orignally wrote this effectivley making it php code but it was actually javascript.
what have I done wrong?
How can i export an array from php to javascript better?
Last edited by coreymanshack on Sun Sep 27, 2009 5:07 pm; edited 2 times in total
Here is the array that's been passed in.
PHP:
| Code: |
| Array ( [0] => Array ( [ConsultantID] => 2 [ConsultantIN] => GAW [Login] => GAW002 [Consultant] => Gene Williams [SecurityLevel] => 1 [Extension] => 0 [UserName] => gwilliams [Password] => blah [Address] => 123 Blah Ln [City] => Fort Worth [State] => TX [ZipCode] => 76108 [Email] => blah@blah.com ) ) |
when i access
Javascript:
| Code: |
| array[0]['Consultant'] |
it says undefined.
EDIT: I accidentaly put a dollar sign in front of array[0]['Consultant'] when I orignally wrote this effectivley making it php code but it was actually javascript.
what have I done wrong?
How can i export an array from php to javascript better?
Last edited by coreymanshack on Sun Sep 27, 2009 5:07 pm; edited 2 times in total
