How to convert string ["4"] to real array?

How do you guys get values stored as varchar in format like: ["4"] ?
For some reason, when I do $article->category[0] it returns [ instead of 4 - probably because it looks at it as a string and [ is the 0th character. But how to make PHP think ["4"] is an array and to return 4 when asking for 0th item? Thanks in advance.
Was this page helpful?