Hi - I am having an issue and can't seem to get my head around it. I am trying to calculate GBP from EUR - which should be easy but for some reason my returned value is always a few GBP more than it should be, yet I do the same calculation on my calculator or Google and it's right. Can anyone see what I am doing wrong?

I have this:

$rate = 1.20881; //var_dump shows float, tried different combos too
$euro = 74; //var_dump shows float

$gbp = ($euro / $rate);
//should give me 61.21 but it keeps giving me 64.52

I know it must be something really stupid I am missing and most likely simple, any help would be appreciated.

Member Avatar


It works fine for me. It gives: 61.217230168513 on web page and 61.217230168512834936838709143703 on caulculator which tallies.

Sorry community - forget I ever said anything! Just spotted my mistake - I keep passing 78 not 74! As if I missed this!