I\'m trying to map some arrays values to an unordered () list.
I'm not sure about this, but this might work:
That's what I would use, and if this doesn't work, it might be because your $dir variable contains nothing (has an error). One reason why your original code might not have worked, because I don't think the ?> tags are compatible on every server. Also, from what I know, there is no =$var ?> thing in php. I thought it only exists in ASP and the like.
EDIT: In answer to your question about the inferiority of curly braces, they are the commonly accepted standard in PHP. This might be different in the C/C++/C# Family, I don't know.