I have a single key value array which I would like to loop through and create a seperate array from if certain conditions are met.
For example:
array(
1 => value
2.1 => value
2.2 => value
2.3 => value
2.4 => value
3 => value
)
My variable / condition I want to check is if the item in the array starts with a specific number. For example, if my var = 2, how can I create:
array(
2.1 => value
2.2 => value
2.3 => value
2.4 => value
)