erasam Posted April 13, 2007 Share Posted April 13, 2007 Can anyone tell me how to convert a string of words to an integer? eg. "12321" to 12321 thx a lot Link to comment https://forums.phpfreaks.com/topic/46824-php-string-to-integer/ Share on other sites More sharing options...
btherl Posted April 13, 2007 Share Posted April 13, 2007 The simplest ways are $int = intval($str); $int = (int)$str; Link to comment https://forums.phpfreaks.com/topic/46824-php-string-to-integer/#findComment-228245 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.