Mailinglisten-Archive |
Hi Andreas,
Andreas Hackbarth schrieb:
> @Lutz: benütze natürlich nur die Variable $count ... der Fehler ist nur
> bei
> der Mail beim umkopieren passiert ... die for-schleife läuft durch ...
> aber
> danke :)
ich weiß nicht, was Ihr heute alle anstellt... ;-) Aber: Wenn ich Deinen
Code korrekt schreibe und bei mir ausführe, dann wird das Element mit der
ID 2 doch aus dem Array gelöscht:
<?php
$for_country[0]='Albania##2';
$for_country[1]='Bosnia And Herzegowina##27';
$for_country[2]='####';
print_r($for_country);
$count_country = count($for_country);
for($k=0;$k<$count_country;$k++)
{
if($for_country[$k] == "####")
unset($for_country[$k]);
}
print_r($for_country);
?>
:-)
Viele Grüße
Lutz
php::bar PHP Wiki - Listenarchive