Tuesday, 1 April 2014

create array from array php

There's my array :`$horaire[] = array( 'Title' => 'Title_value',
'Day' => 'Day_value', 'Hour' => 'Hour_value', '1erDiff'
=> 'yes');`Let's contend i have 50 entries.. (pull from EE channel
entries.. )Day_value are from 0 - 6I wish to emanate new arrays from this
array if a value of Day is ex.:$Sunday[] = array ('Title' =>
'Title_value', 'Day' => 'Day_value', /**ALL VALUE HERE WILL BE 0/
'Hour' => 'Hour_value', '1erDiff' => 'yes');$Monday[] = array
('Title' => 'Title_value', 'Day' => 'Day_value', /**ALL VALUE HERE
WILL BE 1 / 'Hour' => 'Hour_value', '1erDiff' => 'yes');and
so on...ORSecond questionIs it illusory to arrange a initial array
$horaire as it's arrange from 0-6 (day_value) though inside this also
arrange hour_value (without changing a Day_value sorting.. )ex,:[o] =
array (DAy => 0, Hour => 5)[1] = array (Day => 0, Hour => 9)[2] = array
(Day => 1, Hour => 3) [3] = array (Day => 1, Hour => 10)and so on...
Thanks everyone!Ben

No comments:

Post a Comment