#1
Hi,
I have an issue with my sidebar dropdown over populating with array values.
My controller looks like this:


My view file looks like this:


Question is why is the foreach loop over populating with array records which should be placed instead in each of the dropdowns?

I have posted this question over at speed coding academy members forum with an image highlighting my problem, so my apologise for the duplicate question.

Thanks, TekTime
#2
Hi,

Thanks for that question.

I'd be willing to do a YouTube tutorial covering this, provided the following conditions are met:

1). Please explain to me in plain English what you are trying to do. Having a color pallet on the side navigation is extremely unusual. So, I'm just wondering, ' What is the point of this thing?'.

2). Send me an SQL dump with some table data.

3). Give me permission to use one of the templates from the Module Market for any potential tutorial. I simply can't spent my time fire-fighting Bootstrap or whatever it is you've used.

If these conditions are acceptable then please email me with those three things and please also set this thread to resolved.

If that's not cool for any reason or if the thread is not resolved then I'll assume that you're happy to take on board more responses from other people.

Cheers!

DC
#3
Try using DISTINCT in your query.
Dan
#4
Hi TekTime,

You are going to have to share a bit more database information than you have.

A json($data['item_col'], true) would help see the data too.


Could you please also upload SQL dumps of the 3 tables you are trying get the colour palette options?

I see on the SCA forum, you have posted the same question >> https://ums.myds.me/phpbb/viewtopic.php?f=7&t=1187&p=4996#p4996
#5
Hi DC,
My apologise for the delay. I will get all the particulars over to you tomorrow.

TekTime
#6
Hi,
Finally managed to resolve my issue, I was doing my arrays for the sidebar incorrectly. I have it correctly working using PHP lodash.

A huge thanks to the team for the support.

TekTime
#7
Hey Tektime,
Could you share your solution?
Dan
#8
Hi,

absolutely Dan, would you like me to post my solution over at speed coding academy forum since I am unable to post images here or would you like me to just post the code with comments here?
#9
Both if you can
Thanks again!
#10
Hi,
I have add the SQL dump with table data alongside my solution over at SCA Members Forum.

Thanks

TekTime