Is it possible to delete json in php?

藏色散人
Release: 2023-03-14 07:08:02
Original
2783 people have browsed it

php can delete json. The method is: 1. Create a PHP sample file; 2. Get json data; 3. Delete the specified json through "unset($data['10073']);" Just data.

Is it possible to delete json in php?

#The operating environment of this article: Windows7 system, PHP7.1, Dell G3.

php Is it possible to delete json?

Is it possible to delete json in php?

#I want to delete the data in the red box through commands, how to do it?

The code is as follows:

<?php
$json_data = &#39;{....}&#39;;
$data = json_decode($json_data, true);
unset($data[&#39;10073&#39;]);
var_dump($data);
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of Is it possible to delete json in php?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template