Solarpitch Posted June 25, 2008 Share Posted June 25, 2008 Hi, How can I test to see if a result from a DB is numeric or not? Say I have a variable $value. $value might return either a number or a string from the database, but I then want to go... if($value == //is numeric) { // do something... } can this be done easily? Link to comment https://forums.phpfreaks.com/topic/111859-solved-seeing-if-a-result-is-numeric-or-string/ Share on other sites More sharing options...
Solarpitch Posted June 25, 2008 Author Share Posted June 25, 2008 I dont generally answer my own questions but the is_numeric() function should work. Link to comment https://forums.phpfreaks.com/topic/111859-solved-seeing-if-a-result-is-numeric-or-string/#findComment-574179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.