Hello,
I have the following array
Array
(
[0] => Array
(
[cName] => 'Lexington Table Tennis Club
(9/30/2014)'
[local] => 'Castlewood Gym
201 Castlewood Dr.
Lexington, KY 40505'
[days_times] => 'Saturday - 2:30 - 6:00PM and Sunday - 9:15AM - 12:00PM'
[contact] => 'Babak xxxx
859-xxx-2498'
[marker] => '<-----CLUB DATA ENDS ----->'
)
[1] => Array
(
[cName] => 'Table Tennis Club of Louisville
(3/31/2014)'
[local] => 'Beechmont Community Center
205 W. Wellington Ave
Louisville, KY 40214
Directions:
Located just 2 miles from Louisville International Airport'
[days_times] => 'Tues - 4:00 -9:00PM, Wed - 11:00AM - 2:00PM, & Sat - 9:00AM - 1:00PM'
[contact] => 'Paul xxxxx
502-805-xxxx'
[marker] => '<-----CLUB DATA ENDS ----->'
)
)
I would like to look inside each sub array with keys [0] and [1] for the sub-array [local]. Now inside the value of [local] I would like to extract the 5 digit zipcode and then insert a new array after [local] with a key of [zip] => 'the extracted zip'
as an example, array with key [1] would look like:
[1] => Array
(
[cName] => 'Table Tennis Club of Louisville
(3/31/2014)'
[local] => 'Beechmont Community Center
205 W. Wellington Ave
Louisville, KY 40214
Directions:
Located just 2 miles from Louisville International Airport'
[zip] => '40214'
[days_times] => 'Tues - 4:00 -9:00PM, Wed - 11:00AM - 2:00PM, & Sat - 9:00AM - 1:00PM'
[contact] => 'Paul xxxxx
502-805-xxxx'
[marker] => '<-----CLUB DATA ENDS ----->'
)
Is this doable? if so, may I ask for some assistance...
Thank you!