Aswin Lutchanah

Hybrid Social Media Manager

I was looking for a way to check if a string contained only numerical values.  I thought that the php function is_numeric() would do the job. I was wrong.

echo is_numeric(555); // 1
echo is_numeric(55.55); // 1
echo is_numeric(+55.55); // 1
echo is_numeric(-55.55); // 1
echo is_numeric(-+55.55); // 1

Facebook ids (for developers)


Posted In: PHP, SMO, Web Development

Tags: , , , ,

Leave a Comment