Thanks, I tried that, but it didn't work. Actually I just solved the problem by using a multi-dimensional array so that I could use "foreach" to move throught the elements.
So first I created a md array in my php page as below.
$itemMenu->option_names=array(
array("path"=>"","menu"=>"--Items--"),
array("path"=>"items.php?cmd=additem","menu"=>"Add Items"),
array("path"=>"items.php?cmd=viewitems","menu"=>"View Items")
);
Then used foreach to display elements.
foreach($this->option_names as $options) {
print"<option value='$options[path]'>$options[menu]</option>";
}