Supportnet / Forum / Skripte(PHP,ASP,Perl...)
Einfaches Problem bei php.
Frage
[code]<?php
function count()
{
static $count = 0;
$count++;
return $count;
}
print $count;
?>[/code]
Ergibt bei mir folgende Fehlermeldung:
PHP Fatal error: Cannot redeclare count() in D:\OmniSecure\htdocs\test.php on line 9
Line 9 ist die mit der "}" drin
Antwort 1 von harrrharrr
Kannst du mal erklären was das bewirken soll, b.z.w. wo du das her hast? PHP ist das nicht.
Gruß
harrr
Gruß
harrr
Antwort 2 von Supermax
Funktionen
count() und Variablen $count dürfen nicht denselben Namen haben.Antwort 3 von selner
print count();
