Welcome visitor
* Login
* Register
It is currently May 24th, 2019, 4:59 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Server Side » PHP



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  help to divide an array
PostPosted: February 19th, 2009, 11:45 pm 
User avatar

Posts: 56
Hi, again...

Im here with another easy silly question... what can I use to put like the first 3 elements from one array unto a new array and the rest on a different one? does that make sense?

Again, thanks for taking your time to help me.


Top
 Profile  
 
  Re: help to divide an array
PostPosted: February 19th, 2009, 11:51 pm 
User avatar

Posts: 61
$firstA = array_slice($originalArray, 0, 3);
$secondA = array_slice($originalArray, 3);


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Server Side » PHP


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron