View Single Post
Old 02-28-2008, 12:06 AM   #21 (permalink)
CHASE
The Wanderer
 
Join Date: Feb 2008
Posts: 18
Thanks: 0
CHASE is on a distinguished road
Default

I'm not sure if this follows the rule of 8 lines perfectly, but I did my best, and wasn't sure what a "line" was defined at.

PHP Code:
<?php

    $a 
1;
    
$b 2;
    
    
$string "The quick brown fox jumps over the lazy dog.";
    
$string explode(" "$string);
    
    foreach ( 
$string as $line )
    {
        if ( 
$numb == $a )
        {
            
$numb $b;
        }
        else
        {
            
$numb $a;
        }
        
        
$array[] = $numb;
    }
    
    
$a $array[1];
    
$b $array[2];
    
    
var_dump($a);
    
var_dump($b);
    
?>

Last edited by CHASE : 02-28-2008 at 06:46 AM.
Send a message via AIM to CHASE Send a message via MSN to CHASE Send a message via Skype™ to CHASE
CHASE is offline  
Reply With Quote