Hello,
I would like the value that has an o in the following example to be added to the key before the first key that has a value with an o in the array. Like this:
$arr = array(
0 => 'apple',
1 => 'pear',
2 => 'orange',
3 => 'octopus',
4 => 'pineapple'
)
$arr = array(
0 => 'apple',
1 => 'pearorangeoctopus',
2 => 'Pineapple'
)
But the amount of rows that has an o can be variable and multiple times in there..
$arr = array(
0 => 'apple',
1 => 'pear',
2 => 'orange',
3 => 'octopus',
4 => 'pineapple',
5 => 'blueberry',
6 => 'pumpkin',
7 => 'chocolate',
8 => 'icecream'
)
$arr = array(
0 => 'apple',
1 => 'pearorangeoctopus',
2 => 'pineapple',
3 => 'blueberry',
4 => 'pumpkinchocolate',
5 => 'icecream'
)
anyone got an idea? :)