PHP code example of daumling / php-dataset

1. Go to this page and download the library: Download daumling/php-dataset library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

daumling / php-dataset example snippets


foreach ($file->where('age', '>=', 65)->fetch() as $record) ...

foreach ($file->where('age', '>=', 65)->where('address.state' '=', 'NY')->fetch() as $record) ...


use \Daumling\Dataset\File as DB;

// set the path
DB::setOptions([
    'path' => __DIR__.'/data/*.json'
]);
// Open data/addresses.json
$file = DB::get('addresses');