function genList($passedArray = 404, $optListType="unordered list", ... more things here) {
//your code here
if ($passedArray != 404) {
$theList = $listType[$optListType];
while ($i = 0; $i < count($passedArray); $i++) {
}
}
else
{
$theList = "<ul><li>Missing</li></ul>";
}
return $theList;
}
Pass the array to the genList() (which you have to program), make it pass back the entire list.
I would make the genList accept a couple of variables, though most of them optional (defaulting to values).
like: bullet type, psuedoclass, list-type, etc.
(ordered list, unordered list)
ps. the example might be buggy, I havent touched php in a while (doing mostly asp.net now). Take it as psuedocode, as it's not tested.
Olav Alexander Mjelde
Admin & Webmaster