Handling integer types
Just to give you an idea of the problem before I show you the solution, here's why this is posted here.
I had a script that read an xml file with simplexml and then output the value of the tag based on a number passed in a query string attached to the url. I had to print the message using the following line
This did not work, because it did not think $number was an integer value so that we could reference the value from the array $xml_parsed->msg. In order to tell PHP that $number is an integer, or at least a number, you can run the following function on $number.
[Click to add or edit comments])
Please prepend comments below including a date