Re: Multi-array - What am I missing?

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

 



Chris Ditty wrote:
Can anyone point me in the right direction?  I know I am missing something
simple, but I can't place my hands on it.

$myCalTime = act_getCalendarDays($config, $myMonth, $myYear);

foreach($myCalTime as $calTime => $calArrayTime){
    $calArray[] = $calArrayTime['day']."=>array('NULL','linked-day
".strtolower($calArrayTime['reason'])."','".$calArrayTime['day']."'),";
}

act_getCalendarDays returns this....
Array
(
    [day] => Array
        (
            [0] => 05
            [1] => 06
            [2] => 26
            [3] => 27
        )

    [reason] => Array
        (
            [0] => Vacation
            [1] => Vacation
            [2] => Vacation
            [3] => Vacation
        )

)


What am I missing to get this
=>array('NULL=','linked-day ',''),

to look like this
05=>array(NULL,'linked-day vacation','05'),



$both = array();
foreach ( $myCalTime['day'] AS $i => $date ) {
  $both[$date] = array(null,"linked-day {$myCalTime['reason'][$i]}",$date);
}

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux