Convert string to int in PHP

Here’s another quick tip.  If you have an integer value stored as a string and want to convert it to an “int” type, this tip is for you.  You might want to use this if you’ve read an integer from a text file and therefore it was read in as a string value, but now you want to do a numeric comparison.  Anyways, on to the tip.  The following code converts a the string “25” to integer format.

Read moreConvert string to int in PHP