Hi when trying to cast from a string to int using int() i get the following error:
Call to undefined function int()
Why would this be?
inval() works just fine but i cannot use int() for some reason
Hi when trying to cast from a string to int using int() i get the following error:
Call to undefined function int()
Why would this be?
inval() works just fine but i cannot use int() for some reason
Have you tried
$intVar = (int)$var;
If PHP is telling you that int() isn't a function, then it probably isn't.
There is no int function; you must use proper typecasting syntax for this:
$b = (int) $a;