Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Trying to convert string into array which has a key and a value in PHP

{"Name?":"Hamz","Why do you want to join the team?":"Test","Your Date of Birth?":"2000-05-02","Your Age?":"25"}

This is the string I have, "question":"answer" then there each split by a comma.

Would anyone know how I would go about doing this in php?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You should use json_decode as it is json:

https://www.php.net/manual/ru/function.json-decode

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading