I gang

Fix PHP/JS Script

I have a script that pulls a dataset from a mysql database. It then converts it into a json object.

My javascript pulls a new item every 5 seconds. The script works ok when the json is properly formed. But when I pull it out of the db and use PHP's json_encode() it doesn't encode it properly, I think.

Script works when I have:

var data = {

posts: [

{

body: "Excellent, 5 stars!"

},

{

body: "Poor, 0 stars"

},

{

body: "Beyond Excellent, 10 stars!"

}

]

};

and this is the code that PHP's json_encode() gives:

var data = {

"posts":[

{"post":{"phone":"+15555555555","status":"0","body":"http:\/\/[url removed, login to view]"}},

{"post":{"phone":"+15555555555","status":"0","body":"http:\/\/[url removed, login to view]"}},

{"post":{"phone":"+15555555555","status":"0","body":"[url removed, login to view]"}},

{"post":{"phone":"+15555555555","status":"0","body":"this is a longer test"}},

{"post":{"phone":"+15555555555","status":"0","body":"test"}}]};

I need to have the body text fade in and out. Attached is the script. One version working (static json elements) and another not working (pulling from the DB). I need to be able to pull from the DB. Shouldn't take the right person maybe 10 minutes to fix I assume. I can give access to the server with the mysql db to get it working.

PHP version: 5.2.4

Færdigheder: jQuery / Prototype, PHP

Se mere: test my javascript, test js, my fix com, google js, get prototype, get my fix, beyond com, php.js, php is object, php json , json script, JSON PHP, js script, jquery script, jquery fix, fix-access/, fix php, fix database, fix a c++ script, data pulling, data encode, body works, server prototype, use php, fix database access

Om arbejdsgiveren:
( 14 bedømmelser ) Guyton, United States

Projekt-ID: #931958

Tildelt til:

smartgest

Please check PM.

$30 USD in 0 dage
(28 bedømmelser)
5.4

7 freelancers are bidding on average $47 for this job

acesolution

lets do it ...

$30 USD in 0 dage
(124 bedømmelser)
6.7
shuiwatermizu

please see pm

$30 USD in 0 dage
(96 bedømmelser)
6.4
harish1984

Hi, I can help you, Plz view your PMB.

$30 USD in 0 dage
(77 bedømmelser)
6.3
nsdu

I could help you.

$30 USD på 1 dag
(18 bedømmelser)
5.5
dataentry17

Hi sir I m ready to start immediately.##### PLEASE CHECK PMB ##### Thanks.

$30 USD på 1 dag
(10 bedømmelser)
3.5
vietcms

I'm expert on this kind of work, ready to start now. Thank you.

$150 USD in 0 dage
(4 bedømmelser)
2.4
LadyGaaga

Can fix it quick as I already did similar. Please check PM.

$30 USD på 1 dag
(0 bedømmelser)
0.0