Jump to content

Search the Community

Showing results for tags 'json'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 13 results

  1. I've been working on JSON and have found a way to send variables from the PHP to the JavaScript using AJAX and no JQuery. For an ecommerce site does it make more sense to send the variables : description, title, cost, etc. to the JavaScript page, or would it make more sense to echo the html on the PHP page? The idea, right now, is a product page for editing and deleting product. Thanks, Josh
  2. I asked this question before and I did receive the answer I was looking for. But now I realize something. It only works for the first result. Let me explain. I am using this API. https://block.io/api/simple/php $get_address = $block_io->get_transactions(array('type' => 'received', 'addresses' => $my_wallet)); $api_amount = $get_address->data->txs[0]->amounts_received[0]->amount; $api_recp = $get_address->data->txs[0]->amounts_received[0]->recipient; $api_trans_id = $get_address->data->txs[0]->txid; $api_sender_id
  3. I am trying to using this API. https://www.blocktrail.com/api/docs I can retrieve the first layer value using this. $global_trans_id = $client->transaction($post_transid); $api_transaction_id = $global_trans_id['hash']; echo $api_transaction_id; As you see "hash" is the first layer below. But what if I want to retrieve the second layer such as a value from "Inputs" or "Outputs" like "$global_trans_id['address'];". How would that look? { "hash": "c326105f7fbfa4e8fe971569ef8858f47ee7e4aa5e8e7c458be8002be3d86aad", "first_seen_at": "2014-03-11T08:27:57+0000", "la
  4. I have made an ajax call (using file activedirectory.php) to active directory to retrieve information such as name,thumbnail photo,mail etc. the ajax call is made on click of a name in a leaderboard ,to fetch only that person's info by matching the post['id']. The problem is that I am unable to retrieve any information and the console gives me an error saying : SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data the error type makes it clear that it is unable to pull any data whatsoever. .php file that has been used here :(activedirectory.php) --
  5. webdevdea

    Json help

    at my link http://dandewebwonders.com/BBProject%204/index.php when you click on players you see the error.. this is what i need to do .. change data type from html to json, fix the controller error, and change it to parse the data.data object. case "listPlayers_Data" : $response = null; $results = array(); $players = new PlayersClass(); foreach ($players -> RetrieveAll() as $row) { $results[] = new PlayerListModel($row -> Id); } $response -> data = $results; echo json_encode($response); break; and a lin
  6. "status": "success", "data": { "network": "DOGE", "prices": [ { "price": "0.00003556", "price_base": "LTC", "exchange": "cryptsy", "time": 1401185325 } ] } I know I can access the top value like this. echo $access->status; But how do I access the sub values underneath? The ones in "data"?
  7. I'm trying to save some json data to an mysql table through php but I do have some issues I'm just stuck into the loop and the validation doesn't go like I want to. These are some dummy data of the json Object [entiteteTeReja] => Array ( [cmimeReja] => Array ( [0] => Array ( [KODNIVELCMIMI] => N1 [KODARTIKULLI] => BOBLT0009 [KODNJESIA1] => cope [MONEDHAKOD] => LEK
  8. $outp = ""; while($rs = $result->fetch_array(MYSQLI_ASSOC)) { if ($outp != "") {$outp .= "";} $outp .= '{"Portrait":"' . $rs["Portrait"] . '",'; $outp .= '"First Name":"' . $rs["FName"] . '",'; $outp .= '"Last Name":"' . $rs["LName"] . '",'; $outp .= '"DOI":"'. $rs["DOI"] . '",'; $outp .= '"MOI":"'. $rs["MOI"] . '",'; $outp .= '"YOI":"'. $rs["YOI"] . '",'; $outp .= '"ID":"'. $rs["id"] . '"}'; } $outp ='{"records":['.$outp.']}'; Hi for the above PHP code the output looks like this JSON format { "records": [{ "Portrait": "image1.png", "First Name": "Da
  9. Hi guys, i've been struggling with a problem regarding reading the JSON structure, decoding it and than trying to extract a UNIQUE key structure from it. So let me show you by example what im trying to do here. Let's take a look at this JSON: { "status": true, "message": "Everything was ok", "posts":[ { "id": 1, "post_type": "type_a", "posted_on": "", "updated_on":"", "user":{ "id": 1, "name": "" }, "num_comments": 2, "comments":[ { "id": 1,
  10. Hello I have several json files in one directory. i would like to merge them in to one. I did something like this <?php foreach (glob("../json/*.json") as $filename) { echo basename($filename) . "\n"; } $res1 = file_get_contents($filename); echo $res1; ?> But it echoes only the last (the first echo is to view all files which is not important here) Then I tried many versions of foreach inside foreach with no success. Like this: <?php foreach (glob("../json/*.json") as $filename) { foreach (file_get_contents($filename) as $a) { } } echo $a; ?> So I appreciate a li
  11. I have my data array which i converted to json by splitting the keys using for each loop. Data: $data = Array ( [table6-ios-camt] => [table6-ios-iamt] => [table6-ios-samt] => [table6-ios-type] => [table6-isd-camt] => 0 [table6-isd-iamt] => 0 [table6-isd-samt] => 0 [table6-isd-type] => [table6-ios-csamt] => [table6-isd-csamt] => 0 [table6-other-camt] => [table6-other-iamt] => [table6-other-samt] => [table6-other-type] => [table6-tran1-camt] => 0 [table6-tr
  12. dear PHP-Freaks The French government has created a website showing the list of all 4307 hospitals and clinics in France: http://www.ScopeSante.fr We can see the list of all establishments web page, The site uses its own private API to get the list of establishments in the first place. Check out: https://ws.scopesante.fr/v4/carte-etablissements https://ws.scopesante.fr/v4/carte-etablissements 0 {…} 1 n "CENTRE HOSPITALIER DE BELLEY" id "010000032" cert {…} s 1 t 2 geo […] 2 n "CH DE TREVOUX - MONTPENSIER" id "010000065" cert {…} s 1 t 2
  13. Hello Mate, I would like to seek help... i have this json script which gets the names of the users from my database: $sql=mysql_query("SELECT firstname FROM tblusers WHERE usertype=1"); $u = array(); while($rs=mysql_fetch_array($sql)){ $u[] = $rs['firstname']; } print json_encode($u); And getting this to javascript function through ajax: function uList(){ $.ajax({ type: "POST", url: "techs.php",
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.