json_encode is a PHP function that converts a PHP value into a UTF-8 JSON encoded string.
0
votes
0answers
29 views
How to get Json array name json_encode from php array? Android
I'm kinda stuck with this problem, I'm about to parse JSON to my android app. I created my own model in php using this:
class Users extends CI_Model
{
function get_all()
{
$query = ...
1
vote
1answer
19 views
Turning an indexed array to json object in PHP
When I use json_encode I get one large array filled with objects. How do I get the result to return many json objects.
e.g
current result
[{data1}, {data2}, {data3}]
the result i want
...
0
votes
1answer
21 views
Trying to grab a json file to cache it locally
<?php
$json_url = 'https://api.feedbin.me/v2/entries.json';
$username = 'username'; // authentication
$password = 'password'; // authentication
$ch = curl_init( $json_url );
$options = array(
...
0
votes
0answers
19 views
Google Chrome character encoding while sending PUT requests to the server
I am trying to send a chunk of data from a text field which looks like this
Auth vers : 5b
#
# Product License File
# DO NOT EDIT THIS FILE!!
#
# Technical Support:
...
0
votes
0answers
68 views
json or jquerry works on localhost but not on live server
This code to login user works on localhost but not on live server. index.html will post variable to checklogin.php via ajax and the response is either 0 or 1. Right now I don't get either. Wrong ...
0
votes
3answers
43 views
Using json_decode to retrieve ajax-sent javascript array for email
I'm trying to email the contents of a JS array by encoding using JSON.stringify and then decoding in the PHP which should then be sent via email. I get a success alert that the data is sent to the PHP ...
0
votes
2answers
28 views
Unable to print JSON response in HTML page AJAX
I have a AJAX function as below:
function ajx(){
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch ...
0
votes
0answers
16 views
How to encode form input to UTF-8 for use in PHP's json_encode
I have a form that accepts a small string of text. After the form is submitted, the string is packed with some other data using json_encode and sent to another web service.
I have noticed that when ...
0
votes
2answers
38 views
Failed to assign variable taken from database to json array
I try to get the data from database to display data via ajax but failed to worked. It's partially working because data from mysql make this thing failed to function.
Here is my ...
1
vote
2answers
56 views
Getting a PHP variable inside an Ajax return?
I'm getting a variable inside my catch (for when a web service call fails) statement and attempting to use json_encode on it:
try {
WebServices::create($this->nameWS);
}
catch (Exception $e) { ...
0
votes
1answer
57 views
Escape backslash in JSON encoding python
I m trying to JSON encode the following dict. But in this case, the message which is actually a unicode character DEVANAGARI LETTER.
So, while encoding this dict into a json object, it seems to ...
-2
votes
0answers
22 views
small Json code add my json page [closed]
i install wordpress plugin she get Json recent posts
if you see her
in this site it's add code in the begging
15a0d
http://sweets.3bnat.com/?json=get_recent_posts
in another site in the server ...
0
votes
2answers
25 views
Is JSON.parse() necessary?
I'm retrieving some data from my server using PHP. I want to use this data in a javascript application so I'm doing something like this:
var polylines = <?php echo json_encode($polylines); ?>;
...
2
votes
2answers
58 views
json_encode returns undefined with array of non-associative arrays
I try to encode data to JSON in PHP (Version 5.3.13) and send it to JavaScript.
My problem is:
When I encode an array of non-associative arrays, it returns undefined:
$arr = array(array(1, 2, 3));
...
0
votes
0answers
41 views
Prestashop Web service to return JSON
After extensive search over internet i am sure that Prestashop does not return data in JSON format, it only returns in XML format (which leads to cross domain accessing issue unfortunately).
Now, I ...