So I wrote this bit of code, but im not sure what I have done wrong. The script always times out before returning a full page.
<CODE>
Function DrawSubMenu($MenuArray, $LinkArray) {
$MenuArrayCount = Count($MenuArray);
$LinkArrayCount = Count($LinkArray);
If ($MenuArrayCount > 0 || $LinkArrayCount > 0) {
If (Count($MenuArray) == Count($LinkArray)) {
For ($row=0; $row < $MenuArrayCount; $row++){
$CompleteMenu .= $row ."<A HREF=\"". $LinkArray[$row] ."\">". $MenuArray[$row] ."</A><BR>";
}
Return $CompleteMenu;
}Else{
Return "<!-- Arrays Not Ballanced -->";
}
}Else{
Return "<!-- No Items In Menu Array -->";
}
}
</CODE>
The function gets called like this:
<CODE>
Echo DrawSubMenu(Array("Link1", "Link2", "Link3", "Link4"), Array("1.php", "2.php", "3.php", "4.php"));
</CODE>
So there you have it, if anyone knows what I have done wrong I would appreciate any help.
-Shea