PHP õ´ÜÀ§ ÄÞ¸¶(,)°¡ Æ÷ÇÔµÈ ¹®ÀÚ¸¦ ¼ýÀÚ·Î ÀνÄÇÏ´Â ÇÔ¼ö |
|
|
 |
15³â Àü |
µû·Î ÇÔ¼ö´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù¸¸... ÇÔ¼ö¸¦ ¸¸µé¾î »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.
<?php
function conv_num ( $num )
{
$number = (int)str_replace(',', '', $num);
return $number;
}
?>
´ÙÀ½Àº »ç¿ë¿¹Á¦ ÀÔ´Ï´Ù.
<?php
$a = "1,1167";
$b = conv_num($a);
echo "¹®ÀÚ - ". $a ."<br>";
echo "Á¤¼ö - ". $b ."<br>";
?>
|
|
̵̧ : 270 |
̵̧
¸ñ·Ï
|
|