PHP Classes

File: examples/copy.php

Recommend this page to a friend!
  Classes of Nahid Bin Azhar  >  PHP JSON Query  >  examples/copy.php  >  Download  
File: examples/copy.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP JSON Query
Query JSON data to find and extract information
Author: By
Last change:
Date: 4 years ago
Size: 579 bytes


Class file image Download
 * Example: copy($node)
 * ======================
 * copy() make deep copy of current instance of Jsonq.

require_once '../vendor/autoload.php';


$q = new Jsonq('data.json');

try {
$res = $q->from('users')->get();

// creating new copy of Jsonq instance
$q2 = $q->copy();
$res2 = $q2->reset()->find('');
dump($res, $res2);
} catch (\
Nahid\JsonQ\Exceptions\ConditionNotAllowedException $e) {
} catch (\
Nahid\JsonQ\Exceptions\NullValueException $e) {

For more information send a message to info at phpclasses dot org.