convert PHP array to Javascript array


Posted on 16th Feb 2014 07:03 pm by admin

I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javascript array. is this possible? I tried with Json_encode but it doesn't seem to work. is there something I have to do on the javascript side to make json_decode work?

No comments posted yet

Your Answer:

Login to answer
235 Like 33 Dislike
Previous forums Next forums
Other forums

Date Format
Hi there,

I have a date format like this right now:
Sat, 17 Oct 2009 17:04:00

I ne

BackButton Behaviour in AJAX
I have an ASPX Page AJAX Enabled!The page has a gridView and a DDL for filtering on it. The Gridview

What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor

Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).
I keep getting the

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

tell csv import script to ignore blank rows?
Hi i have the below script but i get an error if a row is blank ie a return in the csv file at the e

Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu

PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u

Get keys and values from an array
Hellow,

I have an array $Data with keys and values. With a foreach I can display all the valu

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash