I am trying to make a string to a int.
Heres an example:
Code: Select all
<?php
$a1 = '567,89';
$a1 = (int)str_replace(',', '.', $a1);
echo $a1;
?>
How can I get the result I want?
Moderator: General Moderators
Code: Select all
<?php
$a1 = '567,89';
$a1 = (int)str_replace(',', '.', $a1);
echo $a1;
?>