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 Quote Link to comment Share on other sites More sharing options...
yarnold Posted July 30, 2007 Share Posted July 30, 2007 echo intval(max($str)); Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.