Hi, I wonder if anyone can tell me in the right direction with this problem, I do not know where to start from.
I have an array that follows this structure
array ([0] => array ([day_id] => 1 [plan_id ] = & Gt; 3 [Day_num] = & gt; 1 [Schedule_time] => 1300866720 [Checkin_time] => [OK] => [1] = & gt; Hey ([day_id] = & Gt; 2 [plan_id] = & gt; 3 [day_num] [& gt; 1300953120 [checkin_time] => [fine] => [2] => Hey ([day_id] = & gt; ; 3 [plan_id] = & gt; 3 [day_num] = & gt; 3 [schedule_time] => 1301039520 [checkin_time] => [fine] => [3] => Hey ( [Day_id] = & gt; 4 [plan_id] => 3 [day_num] = & gt; 4 [schedule_time] => 1301125920 [checkin_time] => [fine] => gt;) What do I do It wants to be loop through the trial 'schedule_time' for a specific time, if it matches the entire array, then it is saved in the new array ([0] => 1 [plan_id] = & gt; ; 1 [plan_id] => 3 [day_num] ARA ([0] => = & gt; 1 [schedule_time] => 1300866720 [checkin_time] => [fine] => [1] ] = & Gt; Array ([day_id] = & gt; 2 [plan_id] => 3 [day_num] = & gt; 2 [schedule_time] => 1300953120 [checkin_time] => [fine] =>)
same structure etc
You basically have already said everything. You need to create a new and existing one.
$ new_array = array (); Forex Currency ($ array as $ item) {if ($ item ['schedule_time'] & gt; some) {$ new_array [] = $ item; }} I recommend reading the document.
Comments
Post a Comment