sandy1028 Posted July 30, 2007 Share Posted July 30, 2007 Hi, In the array I have some values.... The max($arr) returns the string the maximum number.... But my problem is max value what I am getting is 999 instead of 1000 How to convert the string values to integer Link to comment https://forums.phpfreaks.com/topic/62429-find-the-max-number/ Share on other sites More sharing options...
yarnold Posted July 30, 2007 Share Posted July 30, 2007 echo intval(max($str)); Link to comment https://forums.phpfreaks.com/topic/62429-find-the-max-number/#findComment-310707 Share on other sites More sharing options...
clearstatcache Posted July 30, 2007 Share Posted July 30, 2007 are the values in ur array string or integer? u may used $integer = intval($string); to convert string values to integer... Link to comment https://forums.phpfreaks.com/topic/62429-find-the-max-number/#findComment-310708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.