I'm fairly new to programming and trying to resolve what seems like a basic problem.
Can anyone offer me any pointers?
So what does that array look like?
The missing link here is - how do you know that this is an array? WHERE is it coming from? HOW are you getting it?
Caveat: I have no knowledge of Moodle. I have no idea what it is or what it does.
Moodle is an LMS with several modules built into it. One is a database module which can display records uploaded to it from a csv file.
Each field becomes an array of values depending on which record you are displaying.
One of these fields I have called Location which produces the array [[Location]]
What I want to do, is in the search function, create a dropdown list of all the values in this array so the user can select which location they are interested in and then display all records which hold this information, otherwise I am reliant on the user spelling the locations correctly.
That's it, All I see is [[Location]] which is full of values from a csv file I've imported.