Skip to content

Instantly share code, notes, and snippets.

@aurelkurtula
Created September 21, 2013 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aurelkurtula/6648407 to your computer and use it in GitHub Desktop.
Save aurelkurtula/6648407 to your computer and use it in GitHub Desktop.
st:php: remove array
$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