Jump to content

Whats going on with is_int(eger)


unkwntech

Recommended Posts

I have this code:

$key = str_split('LMELMETETEMSGSYL75B2');
foreach($key as $i)
{
if(!is_integer($i))
 {
	echo $i;
 }
}

but it is outputting:

LMELMETETEMSGSYL75B2

when it should read

LMELMETETEMSGSYLB

 

The point of this is to actually preform a function on the non-integer objects the echo is just for testing

Link to comment
https://forums.phpfreaks.com/topic/134468-whats-going-on-with-is_integer/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.