Hi guys I'm having sometrouble here! Please help if you can!
I'm storing in a mysql database the price of some products. I am storing them in cents ie. €5.99 = 599.
I have the following code that will output just that:
<?php $x='599';
$num = $x;
$last_num = strlen($num) - 2;
$y = substr_replace($num, '.', $last_num, 0); ?>
This gives me just what I want.
The thing is I am using paypal's IPN. So I need to check that the value being sent back from paypal is the same value I have in my database.
So from paypal I get:
<?php
mc_gross = 5.99
?>
so when I do my check to see if they are equal I get a return "False". I presume I would have to change my above function.
Can someone tell me how to go about getting these to be correct?
Thanks