Created
February 19, 2015 19:26
-
-
Save raphaelchaib/dc26ee28620ae792b8a8 to your computer and use it in GitHub Desktop.
Exclude from array by value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if(($key = array_search($del_val, $array)) !== false) { | |
| unset($array[$key]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment