Re: converting a multi-decisional array

[email protected] (Ken Robinson)
Newsgroups php.general
Message-ID <CA+A4UuOwyn1=HJZfsNdNX4OizgiPPBs0-iCmmARE16tvNTG1Gg@mail.gmail.com>
Your current code works fine. I put your code into a test program and there
are no errors. The error must be elsewhere in your code.

<?php
$row =
['sda_day_number'=>1,'sda_start'=>time(),'sda_end'=>time()+100000,'order_id'=>1234];
$pstart = 1;
$pend = 2;
$order_id = '1234';
$avs[$row['sda_day_number']][] =
        array(
                        'dn'            =>      $row['sda_day_number'],
                        'start'         =>      date('g:i a',
strtotime($row['sda_start'])),
                        'end'           =>      date('g:i a',
strtotime($row['sda_end'])),
                        'pstart'                =>      $pstart,
                        'pend'          =>      $pend,
                        'order_id' => $row['order_id']
                );
print_r($avs);

Ken
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.