I have the function get_price_data(); which gives "0,11\u20ac" as return value.
The "0,11" is not static. I want to do some maths with "0,11" from the string below.
My Code shown down below does not work how i want it to. Has someone any idea how i can complete this task ? I am very new to php.
<?php
function get_price_data() {
$json = file_get_contents("http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name=Chroma%202%20Case");
$decode = json_decode($json,1);
echo $decode['median_price'];
}
$string=get_price_data();
$string2 = str_replace("\u20ac","",$string);
echo $string2 * 1000 - 120;
?>