change numbers into letters in php script function
RegisterLogin
change numbers into letters in php script function
Post Description: change numbers into letters in php script function
Tags: change, numbers, into, letters, in, php, script, function
This Post Was Posted On Feb 29, 2008 By web hosting #1863
Post Description: change numbers into letters in php script function
Tags: change, numbers, into, letters, in, php, script, function
This Post Was Posted On Feb 29, 2008 By web hosting #1863
change numbers into letters in php script function by web hosting
so i created this function to help me do that in php
PHP CODE
<?
# FUNCTION BY WWW.WEBUNE.COM
function remove_numbers_advanced($string)
{
$numbers = array();
for($counter =0; $counter <= 10; $counter++) {
$numbers[$counter] = $counter;
}
$replacements = array("zero ","one ","two ","three ","four ","five ","six ","seven ","eight ","nine ");
$string = str_replace($numbers, $replacements, $string);
return $string;
}
$string='This string will have all numbers removed - 213 555 3930';
echo remove_numbers_advanced($string);
?>
this function will change 1 to one
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Thu Dec 22, 2011 10:33 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3