I define $menuLabelIndex and then use it as an index item in the (highly excerpted) array that then follows:Later in the script, I loop through the $menuItems table on two different occasions. On the second occasion, [$menuLabelIndex] is recalculated, so that $quotations [$menuLabelIndex] yields a different result from the $quotations array than from the first looping. You can see the disparate results in the left-hand and bottom menus on any page of www.MarainLaw.com. (It's the entry towards the bottom of the menue that immediately follows the "Super Links" item.)PHP Code:
$lemma = rand (0, count($quotations) -1);
$menuLabelIndex = $lemma;
unset ($lemma);
$menuItems = array(
'Wire Fraud',
'Case Review',
'Super Links',
$quotations [$menuLabelIndex],
'Directions',
'Parking',
'PGP Public Key',
'The Bottom Line',
);
Is there a straightforward way to keep [$menuLabelIndex] from being recalculated?
A.



Reply With Quote



Bookmarks