hallo zusammen
Bin jetzt am ende mit meinem latein und flehe um hilfe.
Ich muss eine csv-datei auslesen und in eine html tabelle schreiben.
Das script äuft auch aber ich bekomme immer diese fehlermeldung die eine warnung ist:
Warning: array_map() expects argument 2 to be an array in /home/httpd/html/test/status.php on line 105.
Ich komm nicht auf den grund der meldung.
Das ist ein teil meines codes
elseif ($newdata == 2)
{
$result = "auswertung.csv";
$fp = fopen($result,"r");
while(!feof($fp))
{
$output = fgetcsv($fp,1024,";");
$check_output = array_map("suche_leer", $output);
if ($check_output[0]=="Call-Nr" || $check_output[4]=="i.A" )
{
continue;
}
else
{
printf("<tr><td width='120' class="g9">$check_output[0]</td><td width='70' class="g9">$check_output[1]</td><td width='120' class="g9">$check_output[2]</td><td width='120' class="g9">$check_output[3]</td><td width='120' class="g9">$check_output[4]</td></tr>");
}
}
printf("</table>");
fclose($fp);
}
und das ist die funktion die ich mit array_map aufrufe
function suche_leer($inhalt)
{
if ($inhalt=="")
{
return $inhalt = " ";
}
else
{
return $inhalt;
}
}
Ich hoffe jemand kann mir helfen
vielen dank im voraus für Eure hilfe
mfG Der Schwabe