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

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?

I was thinking s

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

PHP Tab Control
Hi All,

I would like to have PHP tab control with/without Javascript.

But I want to r

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

exclude characters from counting?
Hello, I wanted to ask if you have a string like:
Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR..

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