Welcome Guest, Not a member yet? Register   Sign In
is_int problem ?
#1

[eluser]Spleshmen[/eluser]
my third uri segment is a number and before i use it i need to check so i am using is_int but its not working ,any chance some one can help me fix this?thanks
Code:
$id = $this->uri->segment(3);
echo $id; //it displays the number from my url
if (is_int($id)==TRUE)
echo 'working';
else
echo 'not working';
#2

[eluser]pistolPete[/eluser]
Have a look at the PHP manual: http://php.net/manual/en/function.is-int.php
Quote:To test if a variable is a number or a numeric string (such as form input, which is always a string), you must use is_numeric().
#3

[eluser]Spleshmen[/eluser]
thanks Smile




Theme © iAndrew 2016 - Forum software by © MyBB