# How to Convert a String to Array in PHP sử dụng json\_decode (ok)

Liên kết: [https://wordpress-lionel.gitbook.io/wordpress/](https://wordpress-lionel.gitbook.io/wordpress/)

```
$user_favorites_arr = json_decode($user_favorites_arr, true);
var_dump($user_favorites_arr);
```

![](https://3988971916-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LXUV09EJOZ8BKB8YL5I%2F-MQyo98APsaeOw0V6yTN%2F-MQypEyWRf8rsjGmlW7I%2FScreenshot_1.jpg?alt=media\&token=627392c8-aa2b-4994-a383-6936e1e57098)

![](https://3988971916-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LXUV09EJOZ8BKB8YL5I%2F-MQyo98APsaeOw0V6yTN%2F-MQypHN3c39VZmmj1QXp%2FScreenshot_2.jpg?alt=media\&token=9b8c89fb-05e7-4405-ba0f-0627cfc0e5e9)
