Hallo,
$wert_des_anderen_array = array("Text1", "Text2", "Text1", "Text2");
$testarray = array(); //Leeres Array
$anzahl = count($wert_des_anderen_array);
for ($i=0; $i <$anzahl; $i++)
{
if(!in_array($wert_des_anderen_array[$i], $testarray))
{
array_push($testarray, $wert_des_anderen_array[$i]);
echo $wert_des_anderen_array[$i]; //Ausgabe
}
}
Ausgabe:
Text1 Text2
MFG
Andavos
--
http://www.rpgcommunity.de/clanwissen/index.php Webdesign, PHP, Clan-Aufbau und mehr
http://www.rpgcommunity.de/clanwissen/index.php Webdesign, PHP, Clan-Aufbau und mehr