I am trying to echo out a variable out of an array. What I want it to do is if [0] exists then echo that, but if [1] exists echo that, or if [2] exists echo that. Sounds easy but I want to do it in one line. Something like:
echo $folder_list[0] || $folder_list[1] || $folder_list[2];
I've seen something like that but with : and ?. Woud that work here? Or am I stuck with doing it the conventional way?
Thanks for you help