I am not an expert with PHP. I am creating an API in order to get some information from one of my website.
Here is the result of api.php:
array (size=4)
'price' => string '29.90' (length=5)
'activation_charge' => string '50.00' (length=5)
'decoder_price' => string '0.00' (length=4)
'is_offer' => int 0
I would like to create an API which would send these information. Here is the sample API call :
www.example.com/api.php?product=11&user=kiran
How should I encode the array results so that I can read it through an API call. I hope, the question is clear.
Thanks
json_encodeto return the result array?&type=jsonto the API for example