Am I doing this right?

nashlab

New Member
I have RPG game. People can buy some items there. I have created a function for items like that:\[code\]function item($id) { switch ($id) { case 1: $name = 'item name 1'; $price = 1200; break; }}\[/code\]Am I doing it right, what do you think, is it a best way to retrieve information about item?
 
Back
Top