1

i stored an array like {"10":"10","14":"14","16":"16","25":"25"}
this as string in data base, right now i tried to get only number from the above string. I tried with explode and str_replace but i can't get the data, can you please help me.

1
  • 10 10 14 14....or 10 14 16 25? Commented Jan 28, 2016 at 9:30

1 Answer 1

5

This is a JSON object you have to decode it with json_decode and take its values with array_values:

$values = array_values(json_decode($string, true));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.