Re: problems changing point for coma...
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: problems changing point for coma...

From: David Haynes <david.haynes2@sympatico.ca>
Date: Tue Mar 07 2006 - 22:04:21 CET

Roco3D wrote:
> I have an array with numbers from a excel file in 12345,78 format and y
> need to change the coma (,) for a point (.) to make this numbers float.
> I have this:
>
> str_replace(",",".",$array_with_numbers); but does not work.
>
> Any help???
>

A brute force method:
for( $i = 0; $i < count($array_with_numbers); $i++) {
   str_replace(',', '.', $array_with_numbers[$i];
}

-david-
Received on Mon May 1 02:28:59 2006