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

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

Cache PHP Objects/Classes?
Does anyone have ideas about caching PHP objects using something like: http://memcached.org/

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

Date Format
Hi there,

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

I ne

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

I need to increse 6hours more, and i don't know how???
I need to increse 6hours more, and i don't know how???
<tr>
<t

UPLOAD IMAGES NOT WORKING!
Hi there i have a upload script in which it uploads the picture to a folder than creates two thumbna

how can i expire the submitted page using session.
hi,
i'm new to php world.
i'm using "post" method.
when i submit it,data goes to

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

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