I know this might sound as really dummy question, but I\'m trying to ensure that the provided string is of a number / decimal format to use it later on with PHP\'s number_fo
You could do something like this if you want only whole numbers.
function make_whole($v){ $v = floor($v); if(is_numeric($v)){ echo (int)$v; // if you want only positive whole numbers //echo (int)$v = abs($v); } }