Thread: odd or even
View Single Post
  #1 (permalink)  
Old 09-02-2008, 06:38 PM
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
Join Date: Jul 2004
Posts: 249
odd or even

How do I distinguish the odd and even in an if statement:
PHP Code:
for($i=0$i<count($spanId); $i++){
    if((
count($spanId[$i]) % 2) == 0){
        
$beginIllustratorNav "<span id = \"".$spanId[$i]."\" style=\"float: right; margin: 5px; display: block; width: ".$spanWidth[$i]."px; height: ".$spanHeight[$i]."px; border: 1px solid #F6F5E3;\" >";
        }else{
        
$beginIllustratorNav "<span id = \"".$spanId[$i]."\" style=\"float: left; margin: 5px; display: block; width: ".$spanWidth[$i]."px; height: ".$spanHeight[$i]."px; border: 1px solid #F6F5E3;\" >";
        }
...

__________________
Gilgal's website:
Wheel Of God
Now easy to post scripture verses!
Portfolio
Reply With Quote