How to remove solid objects from php array

PHP中文网
Release: 2023-03-03 11:22:01
Original
1084 people have browsed it


For example, I have defined an array from 1 to 50 and I want to remove the ones that begin with 2 and 3. How to remove them?

Reply content:

For example, I have defined an array from 1 to 50 and I want to remove those that begin with 2 and 3. Eliminate


Use array_filter and loop to filter them out

The above is how to remove solid objects from PHP arrays. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


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