Thought by duplicating the the first index I could trick a loop I was writing into the display I wanted.
Learned that I didn’t know off the top of my head how to get my array properly indexed even with google’s help. So, I took a detour down a rabbit whole and learned something new about PHP arrays via array_slice().
Ultimately, had to debug the loop, any way, when my short cut failed.
I usually track down knowledge I thought I had, but don’t. This was one of those exercises. I love learning new things.
It comes from my model that selects over 1000 products and sends that data to my view that collapses those products into about 50 descriptions and aggregates their ids into a form input that’s set to display:none; and eliminates duplicate ids.
It’s part a a new path that gives users fewer choices when they want that feature without sacrificing selectability.
Great, now we are on the right track. Still missing some of the overall what and why’s. Perhaps a description from the users point of view might help. It is not clear what “collapses” specifically means or why you ‘aggregate id’s’ or why display is set to none and what it is that is set to none and how you end up with duplicate id’s.
The more information you can provide will allow me/us to give you the best answer to what you are doing. I am pretty sure your current approach is not it.