php - shifting arrays to 1st element -



php - shifting arrays to 1st element -

$important_dates = array( array('start_date' => '2013-01-01', 'end_date' => '2013-12-01' ), array( 'start_date' => '2014-01-01', 'end_date' => '2014-05-03' ) );

i want output:

$important_dates = array( array( 'start_date' => '2014-01-01', 'end_date' => '2014-05-03' ) );

i tried: $important_dates = array_shift($important_dates); failed. possible show me code? help lot. thanks

try instead:

array_shift($important_dates); var_dump($important_dates);

array_shift removes first element of array , returns element - not array.

php arrays multidimensional-array

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -