Hello,
I have an API wherein users can request the price of the item.
When the price is echoed, the server response is as below,
PRICE:384
I want to multiply only the number part with some constant. For eg. if I want to double the price of it how would I do it?
Doing like this isn’t helping me,
case 'getPrice':
$price = $_GET['getPrice'];
echo $price*2;
I just get a response as 0PRICE:384 instead I want it to display PRICE:768
Thanks.