json_encode is a PHP function that converts a PHP value into a UTF-8 JSON encoded string.

learn more… | top users | synonyms

0
votes
2answers
11 views

Dashed line google chart json

I'm creating a line chart using google chart. I have these codes below from googling. How do you add properties for line style (dashed line) to these lines of code? $sth = mysql_query("SELECT * FROM ...
4
votes
4answers
9k views

How do I encode a PHP array to a JSON array, not object?

I am trying to json_encode an array which is returned from a Zend_DB query. var_dump gives: (Manually adding 0 member does not change the picture.) array(3) { [1]=> array(3) { ...
0
votes
0answers
49 views

some wierd data in ajax response?

how do I stop this from happening.I have observed this many times. This is my console.I am just using JSON.stringify(data) in my response. I send some data by ajax-post and in return i get this huge ...
0
votes
2answers
27 views

How to return null instead of empty array or empty object?

By default php json_encode() returns "[]" empty brackets for empty array. Also, it's possible to change to return "{}" brackets: <?php $result = array(); $json = json_encode($result, ...
6
votes
5answers
5k views

How to json_encode array with french accents?

I have an array item with a French accent ([WIPDescription] => Recette Soupe à lOignon Sans Boeuf US). The data is being properly pulled from the database (mysql). However, when I try to encode ...
0
votes
0answers
17 views

Json_encode generate null value while try to connect two database

I have use utf8_unicode_ci for my collation for all the field of my two database.For english language and number is was fine but for thai language it not showed.It show just null.I try to do many way ...
0
votes
3answers
28 views

jQuery/PHP ajaxForm getting JSON encoded results

I got this code for the Form: jQuery $('#form').ajaxForm({ beforeSend: function () { bar.width(0); }, uploadProgress: function (event, position, total, percentComplete) { ...
1
vote
1answer
24 views

json_encode, utf8 and Greek characters

I am writing an android app and i want to query a db and get the results with json_encode. So i have this db: CREATE DATABASE `my_db` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; I use utf8 ...
1
vote
2answers
35 views

Parsing Unicode JSON object in PHP 5.3

I'm trying to parse text from tweets in PHP 5.3, but I have a problem with parsing user mentions, hashtags and links which contain Unicode characters. First I fetch tweets and store it to txt file: ...
2
votes
4answers
7k views

how to get data to javascript from php using json_encode?

I am trying to map traceroutes to google maps. I have an array in php with traceroute data as $c=ip,latitude,longitude, 2nd ip, its latitude, longitude, ....target ip, its lat, its lng I used ...
0
votes
2answers
54 views

jquery ajax script is run successfully but results in error

I have a simple script that keeps resulting in error, even though the PHP script is run successfully. PHP require('/connect.php'); //Has my $link variable if(isset($_POST['pass'])){ $user = ...
-1
votes
4answers
44 views

PHP json_decode thrown an error for validate json string

I have following error Notice: Trying to get property of non-object in action.php while posted json has validated (by jsonLint.com validation). Here is my json string: [ { "eTGid": "1", ...
0
votes
0answers
31 views

PHP json_encode json with variation of array. JSON Sometimes do not appear in firebug as JSON

Does JSON like any specific array structure? when it is used in $value['date'][0] = "12-21-2012"; $value['name'][1] = "Joe"; echo json_encode($value); it seems to detect JSON under firebug ...
0
votes
1answer
27 views

POST huge JSON object in Android

I would like to post a huge JSON object, but when i try i got this error: 0 java.lang.OutOfMemoryError 1 at java.lang.String.<init>(String.java:432) 2 at ...
-2
votes
1answer
50 views

JSON -> Object C# [on hold]

I've got the following code from a website, from which I need to grab some information: { "10800": { "interval": 10800, "interval_name": "3 hours", "hashrate": ...

1 2 3 4 5 52
15 30 50 per page