Created
September 21, 2013 08:05
-
-
Save aurelkurtula/6648407 to your computer and use it in GitHub Desktop.
st:php: remove array
This file contains 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
$posts = array( | |
array( | |
'title' => 'some title', | |
'description' => 'some description', | |
'url' => 'http://aurel' | |
), | |
array( | |
'title' => 'some time', | |
'description' => 'some one', | |
'url' => 'http://aurel' | |
) | |
); | |
foreach ($posts as $key1 => $value) { | |
foreach ($value as $key => $value) { | |
if ($value == 'some description') { | |
unset($posts[$key1]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment