Here's my code, fetch_data.php returns a float (an exchange rate). The first echo will return the float that I need (0.65 something) but the second one will return an integer (1)... Why? How do I fix this?
I'm using include because file_get_contents returned PHP for some reason? I don't have a lot of PHP experience and haven't written a line in a month so I'm rusty.
<div class="callout panel">
<p><strong>We sell for:</strong> $<?php
$coin_price = include('fetch_data.php');
$doge = $coin_price;
echo $coin_price;
echo $doge;
?> per 1000</p>
</div>
fetch data
$string = strip_tags($element); //<strong>$484.66</strong>
$string = str_replace('$', '', $string);
$int = $string;
$val = $int * 1.25;
echo $val / 1000;
any help appreciated