Re: Question About Array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks all 

If I Know It ...
   I Can Do It ...

--- On Tue, 12/8/09, Nurul Ferdous <nurul_ferdous@xxxxxxxxx> wrote:

From: Nurul Ferdous <nurul_ferdous@xxxxxxxxx>
Subject: Re:  Question About Array
To: php-objects@xxxxxxxxxxxxxxx
Date: Tuesday, December 8, 2009, 10:12 AM















 
 



  


    
      
      
      <?php

$country=array( "USA","KSA" ,"SYR","GER" ,"EGY","JPA" ,"CHA","PAK" );

$chunks = array_chunk( $country, 3);

foreach($chunks as $chunk){

        echo implode(' ', $chunk), '<br />';

}

?>



============ ========= ========= ========= ========= ====

Nurul Ferdous

My Blog: http://www.dynamicg uy.com/

My LinkedIn: http://www.linkedin .com/in/nurulfer dous

============ ========= ========= ========= ========= ====



____________ _________ _________ __

From: saeedos <saeedos@yahoo. com>

To: php-objects@ yahoogroups. com

Sent: Tue, December 8, 2009 4:56:43 PM

Subject:  Question About Array



Hi all ,

i have this Array :

$country=array( "USA","KSA" ,"SYR","GER" ,"EGY","JPA" ,"CHA","PAK" );



// I want the output of this array looks like this :



USA  KSA  SYR

GER  EGY  JPA

CHA  PAK



i know it's can be done in Nested for loops , but i don't know how .



thanks 



[Non-text portions of this message have been removed]





    
     

    
    


 



  











      

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux