I want to convert string into multidimensional array, so that I can display it in unordered list
Contents of $notes variable:
Conditions:
Adult fares apply from 13 years old and above. Child fares apply from 4 to
12 years old
Infants not included
What to bring:
Sunscreen, water bottle, hat, sunglasses, camera, small 7kg overnight bag
if using the hop on hop off option
What to wear:
Warm clothes, windbreaker, comfortable walking shoes
Insurance:
We highly recommend all passengers have travel insurance coverage
Optional extras paid on arrival:
Helicopter joy flight over the 12 Apostles AUD145
Not included:
Dinner (at own expen
What want an output like this
[
'conditions => ['some','some'],
'what to bring' => ['content','content']
.......
]
What I tried so far is using explode function
explode(',',$notes)
But this is the output which I donot want
array:8 [
0 => """
Conditions:
Adults fares ....
What to bring
.....
1 => "water bottle"
2 => "hat"
......
]
So expected output as unordered list
conditions
1. ....
2.....
what to bring
1....
2....
Inurance
1..
2...
notice that keys(conditions, what to bring..) are dynamic names, so it may change from time to time but the format is the the same
Any suggestions?