I have an API service with an web based sms provider when I call to api a m getting the below response
{Promotional SMS Credits: 0, Transactional SMS Credits: 9972}
I tried json_decode() to convert it array but failed due to non valid JSON format (missed Quotes for key and value)
I want convert a non valid json string to a valid JSON in PHP like below
{"Promotional SMS Credits": "0", "Transactional SMS Credits": "9972"}
can any one help me?