I have one string contains numbers and i need to convert it in an array. My string is:
["50000001","50000022","50000043","50000106"]
And i need to convert it in an array in PHP.
I have one string contains numbers and i need to convert it in an array. My string is:
["50000001","50000022","50000043","50000106"]
And i need to convert it in an array in PHP.
That string pretty much looks like JSON, so you could use json_decode()
:
$input = '["50000001","50000022","50000043","50000106"]';
$arr = json_decode( $input );