-4

How to convert this string to array in PHP?

   "["COLOR","SIZE","TYPE"]"

I have read so many answers but they have a different string format and also I found the eval() but Im not a fan of it. Thanks in advance.

bumbumpaw
  • 2,522
  • 1
  • 24
  • 54

1 Answers1

0

It's an easy way demo link

$php_value = json_decode('["COLOR","SIZE","TYPE"]');
print_r($php_value);
A.A Noman
  • 5,244
  • 9
  • 24
  • 46