New paste Repaste Download
<?php
include_once  "templates/index_template.inc";
class Entries
{
    private $quantity;
    private $tagWeights = array();
    private function LoadTagWeights($weights)
    {
        foreach($weights as $w => $idx)
        {
            print_r($idx);
        }
    }
    
    function __construct($data)
    {
        $this->LoadTagWeights($data["TagWeights"]);
    }
}
function getDatabaseJson()
{
    
    $jason = file_get_contents('../data/entriesList.json');
    echo $jason;
    $jasonData = json_decode($jason,true);
    $entriesObj = new Entries($jasonData["Entries"]);
    
}
getDatabaseJson();
Filename: index.php. Size: 646b. View raw, , hex, or download this file.
{
    "Application":{},
    "Entries":{
        "Quantity":0,
        "EntriesList":[],
        "TagWeights":[
            ["PHP",1],
            ["Programming",12]
        ]
    }
}
Filename: btree.json. Size: 192b. View raw, , hex, or download this file.

This paste expires on 2024-12-11 00:29:04.070775. Pasted through web.