View difference between Paste ID: gkKcSQuA and rff89rKm
SHOW: | | - or go back to the newest paste.
1
<?php
2
3-
$arr = array(123, 456, 789);
3+
$arr = array('a' => 123, 'b' => 456, 'loeschMich' => 789);
4
5-
foreach ($arr as $element) {
5+
$gesucht = 789;
6-
    echo $element;
6+
foreach ($arr as $key => $element) {
7-
}
7+
    if ($key == $gesucht)
8
        break;
9
}
10
11
unset($arr[$key]);