integer
Round A Number In MS SQL
Mon, 11/10/2008 - 10:20 | by philipnorton42To round a number in MS SQL use the ROUND() function. This function takes two parameters, the first is the number to be rounded and the second is the number of decimal places to round the number to. Here is an example of rounding the numbers in a column to the nearest whole integer.
SELECT ROUND(table.column1,0) rentValue FROM table
String Equals Zero In PHP
Mon, 09/08/2008 - 08:59 | by philipnorton42Due to the weakly-typed nature of PHP you can do some odd things, some of which are good, and some of which will enable you to shoot yourself in the foot. Take the following little snippet.
echo '1' + 5;
In some languages this might cause the program to fall over, but PHP will try to evaluate any string into an integer. In this case it converts the string to an integer 1 and adds this to 5 to make 6.
PHP Function To Turn Integer To Roman Numerals
Tue, 04/22/2008 - 12:37 | by philipnorton42Use the following function to change any integer into a string containing the integer value as a Roman Numeral.
Does A String In PHP Contain A Number?
Mon, 12/24/2007 - 09:56 | by philipnorton42The is_numeric() function in PHP can be used to see if a number contained in a string is numeric. The function returns true is the variable can be parsed into a string, otherwise it returns false. Here are some examples: