phpbar.de logo

Mailinglisten-Archive

[php] Frage zu Array

[php] Frage zu Array

Thomas Beckmann php_(at)_phpcenter.de
Tue, 17 Apr 2001 09:48:26 +0200


>ich habe 2 Array=B4s davon ist $rray2 dynamisch.
>
>$array1 =3D array("A","B","C","D","E","F","G");
>$array2 =3D array("B","D","F");
>
>Erreichen m=F6chte ich:=20
><a href=3D"A">A</a>
><a href=3D"">B</a>
><a href=3D"C">C</a> usw....

foreach($array1 as $wert)
echo '<a href=3D"'.(in_array($wert,$array2)?$wert:'').'">'.$wert.'</a>';

---
Thomas Beckmann, Kiel, Germany
beckmann_(at)_gis.de


php::bar PHP Wiki   -   Listenarchive