I made Cron job using amazon affiliate api and getting price for perrticular product but its not what i want. Its probably super easy but i am new to coding and cant fegure it out
responce from amazon api is INR 1,895.00 and i need 1895 as final result
$price = "INR 1,895.00";
$price = substr($price,4,10);
//removes "INR "
echo $price = (int)$price;
// converts to integer
The value of $price i get 1 due to "," and i m not able to solve it