PHP output of foreach loop into a new array.
- by RobHardgood
I know I'm probably missing something easy, but I have a foreach loop and I'm trying to modify the values of the first array, and output a new array with the modifications as the new values.
Basically I'm starting with an array:
0 = A:B
1 = B:C
2 = C:D
And I'm using explode() to strip out the :'s and second letters, so I want to be left with an array:
0 = A
1 = B
2 = C
The explode() part of my function works fine, but I only seem to get single string outputs. A, B, and C.