[PHP] 文字列をfloatやdoubleに変換する方法
文字列 $str をfloatやdoubleに変換するには以下の通り
$str = '1.11111111'; $str = (float)$str; //floatに変換 $str = (double)$str; //doubleに変換
文字列 $str をfloatやdoubleに変換するには以下の通り
$str = '1.11111111'; $str = (float)$str; //floatに変換 $str = (double)$str; //doubleに変換