azok: Funktioniert!!!

Beitrag lesen

hi!

hab mal wieder voreilig gepostet. funktioniert alles. funktion sieht so aus:

$comment = "comments.dat";
$del = "|";

function array_count_var($string, $file)
{
  global $del;

$num = 0;

$file_array = file($file);
  $fc = count($file_array)-1;

$array_id = array();

for($i=0; $i <= $fc; $i++)
  {
    $element = explode($del, $file_array[$i]);  # Array nach nummer zerlegen und bei | aufsplitten

$id = explode("@", $element[0]);
    $splitted_id = $id[0];
    $array_id[] = $splitted_id;
  }

if(in_array($string, $array_id))
  {
    $ac = array_count_values($array_id);
    $ac_string = $ac[$string];

echo $ac_string;
  }
}

danke für eure antworten!

lg
azok

--
Murphys Law: "Alles Schöne im Leben ist entweder illegal, ungesetzlich oder es macht dick."
Selfcode: ie:% fl:( br:> va:) ls:& fo:) rl:( n4:° ss:| de:] js:| ch:( sh:) mo:) zu:)