I know you just times the figure by 100, but then I'd have 1000.00.
And I know how to 'printf' a value from that and set the 2 to 0, to show 1000.
Code: Select all
printf ("£%.2f", $value);
Moderator: General Moderators
Code: Select all
printf ("£%.2f", $value);
Code: Select all
$source = "10.00";
$converted = intval($source * 100);
var_dump($converted);
The results would be that $converted is integer variable, having a value of 1000. How it would be rendered depends on how you're rendering it.simonmlewis wrote:Thanks.
so the result of this would be that $converted would render as 1000?