Okay, I have two questions when it comes to arrays. I am creating
an array called $inv for inventory. I have a link on the left sidebar
to check inventory, and when you click it, it takes you to a room that
has
<<print $inv >>
So two questions:
1.
When you start the game, I want to display the message "You have
nothing" when you click that check inventory link. But once you pick up
items, I want it to display the items in the array. How do I create
the <<if>><<else if>> statement so it displays
one message if the array is empty and another message if the array has
objects?
2. Currently, when I do <<print $inv >>, it gives the list like this:
milk,eggs,sugar
I want it to give the list with one object per line so it looks like this:
milk
eggs
sugar
Is there a way to set it to that? Maybe by CSS?
Thanks!