Hi
Ich hab das Problem, dass ich eine Funktion aufruf, diese soll eine bestimmte 3-stellige Action umwandeln.
Die Funktion lautet wie folgt:
function convert_action ($action)
{
$x = "";
switch ($action)
{
case 'NWS' : $x = "News includen";break;
case 'KON' : $x = "Kontakt includen";break;
default : $a = 0;
for ($i=0;$i<=strlen($action)-1;$i++)
{
if (substr($action,$i,1) == 0)
{
$a++;
}
else
{
break;
}
$action = substr($action,$a+1,strlen($action)-$a);
}
break;
}
if (is_int($action))
{
$x = "ist integer:".$action;
}
else
{
$x = "Fehler...<br>";
}
return $x;
}
Funktioniert soweit schon alles wunderbar, nur will die Funktion aus einem mir nicht bekannten grund den Wert nicht returnen. Könnt ihr mir weiterhelfen?
gruß
moe