Home  >  Article  >  Backend Development  >  How to remove solid objects from php array

How to remove solid objects from php array

PHP中文网
PHP中文网Original
2016-12-05 13:44:301085browse


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)!


Statement:
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