I am trying to create an array but have no luck.
When I dump my array I get from results, looks ok. I need to create a new array for next processing.
array(1) { [0]=> array(3) {
["name"]=> string(37) "America , United States , City"
["link"]=> string(48) "https://www.test.com"
["icon"]=> string(50) " "
}
}
Based on the array above I need to create array
[0]
["name"]=>"America",
[link]=>"https://www.test.com",
["icon"]=> string(50) " "
[1]
["name"]=>"United States",
[link]=>"https://www.test.com",
["icon"]=> string(50) " "
[2]
["name"]=>"City",
[link]=>"https://www.test.com",
["icon"]=> string(50) " "
Basically, after the separator is "," and it defines how many indexes array will have. In this case, we have three, but for example, we can have only ["name"]=>"America" and it will have only 1 index.
Appreciate any kind of help.