Menu

[r26]: / trunk / samples / local / array.php  Maximize  Restore  History

Download this file

15 lines (12 with data), 199 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<?php
$a = array(
"a" => "A",
"b" => "B"
);
foreach ($a as $key => $value) {
if ($key == "a") {
unset($a[$key]);
}
}
print_r($a);
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.