PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Janjan   PHP Ignore JSON Key   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: index file to access the class
Class: PHP Ignore JSON Key
Remove certain key values from JSON strings
Author: By
Last change:
Date: 7 years ago
Size: 444 bytes


Class file image Download
$ignore = new Ignore;

$val = '{\"message\":\"Password updated successfullyasd\",\"name\":\"Stephen\",\"email\":\"\",\"username\":\"steph5592044d70ff9\",\"status\":\"1\",\"api_key\":\"d738f1c6cc88b8b6d2dcbb9c964b08b2\",\"error\":0,\"message\":\"You are successfully registered\"}';

$exclude = "api_key, email, username";

$ignore->ignore_keys($val, $exclude);