コード例 #1
0
ファイル: index.php プロジェクト: hevelmo/compress
function getJSONAgenciesNews()
{
    $read = new json_file_decode();
    $json = $read->json("../../js/json/json-agenciesnews.json");
    //var_dump($json);}
    $structure = array($json);
    $params = array($json);
    //$agn_id = $json["agencias"][0]["nuevos"][0]["AGN_Id"];
    //$agn_id = ($agn_id !== '') ? $params['agn_id'] = $agn_id : $params = $params;
    echo changeArrayIntoJSON('campa', $structure, $params);
}
コード例 #2
0
ファイル: index.php プロジェクト: deawx/php-json-file-decode
<?php 
/**
* Author: ManuDavila
* Github: https://github.com/ManuDavila/php-json-file-decode
* Website: http://jquery-manual.blogspot.com
**/
require "json-file-decode.class.php";
/* Create json file */
$json = array("images" => array(["images/php.png", "PHP is the best"], ["images/zend.png", "Zend Framework"], ["images/yii.png", "Yii Framework"], ["images/symfony.png", "Symfony Framework"]));
$json = json_encode($json);
$handler = fopen("images.json", "w");
fwrite($handler, $json);
fclose($handler);
/* Create json file */
/* Now reader the json file */
$read = new json_file_decode();
$json = $read->json("images.json");
?>

<!DOCTYPE HTML>
<html>
<head>
<title>php json file decode</title>
<style>
body {
margin: 0;
padding: 0;
}

.container
{