3

I'm using PHP and MySql for my web application.

In Mysql I'm inserting string as JavaScript Array ["0","1","2","3","4","5","6"]

Now I'm retrieving value from database and save in PHP Variable $dow

I need to Convert this to PHP Array like $dow = array("0","1","2","3","4","5","6");

asked Nov 15, 2016 at 15:53

1 Answer 1

2

Use json_decode in PHP for decoding JSON string.

$row = json_decode('["0","1","2","3","4","5","6"]');
answered Nov 15, 2016 at 15:54
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.