Welcome Guest, Not a member yet? Register   Sign In
Exploding Array Elements... Using explode TWICE
#4

[eluser]PoetaWD[/eluser]
Thanks guys,

@richthegeek : Thanks, I dont understant what you did but....

I did it different:

Code:
foreach($columns as $position => $column)
            {
                $c = explode('/',$column);                
                
                if(count($c) == 1):                
                    
                    $columns[$position] =  $column;    
                
                else:                    
                    
                    $columns[$position] = $c;
                
                endif;
            }

I used count() to check if the array had only one value...

I will study your way to learn more about it ! I am just learning PHP...

THANKS A LOT !!!


Messages In This Thread
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 12:24 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 12:38 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 12:48 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 01:08 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 01:12 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 01:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB