Hello i got a question, i have a session array called ‘addToCart’, in there are multiple arrays with various id’s, i would like to loop through these arrays with a foreach regardless of what the id name is. Does anyone know how i would approach this?
Share
Does the following construction satisfy your needs?
If you need to check “sub-arrays”, you can check $value with is_array() function and add one more foreach loop inside.