I am building a small gallery that will only have 20 or so images in it. I'd like to have this data stored somewhere (even in the PHP file itself) and so am looking at ways of encoding the data as a literal or resource file.
In JavaScript, I would use notation resembling (from memory):
var albums = [
{ name='Album 1', photos=['photo1.jpg', 'photo2.jpg'] },
{ name='Album 2', photos=['photo3.jpg', 'photo4.jpg'] }
]
This is JSON, in essence.
I suppose JavaScript is more dynamic than PHP and so this is not possible. Is there a simple alternative, perhaps using XML and binding to some classes?
I'm a complete PHP novice, so please don't assume any knowledge in your answer.