Hi everyone,
What I have is a multi-dimensional array in a plain text database, like follows...
Now, with my code, I can show all these film details, in a HTML table, where I can put these data fields. This is DONE.
What I am trying to achieve is...
If I want to show 'all the films', for which the venue is LONDON (for example, total 5 films), or all the films to be shown on November 15, what should be the piece of code.
I know, there must be an use of 'in_array' or 'array_search', but I am not being able to finalize the shortest and simplest code to be used for this.
This should be an function, where I can mention, 'what field to be sorted' and what is the field value. To be more specific, if I want to show all the films in LONDON as the venue, the function should be like this...
films('Venue', 'London'); // To show all the films, in London
-OR-
films('Date', 'November 15'); // To show all the films shown on November 15.
Then, this function will return an multi-dimensional array, consisting of similar structure as the original and full array like above, and the function will return something like this (for London Venue)...
Notice, these are the films, where 'London' is common as 'Venue' field.
Please help me writing this small piece of code.
Thanks in advance,