Formatting an array for json
<p>I'm using FullCalendar jquery plugin to display a calendar on my website. I was able to hardcode some values any it shows up fine on my calendar. The format should be:</p>

<pre><code>echo json_encode(array(

        array(
            'id' =&gt; 1136,
            'title' =&gt; "Understanding Health-Care Regulations (Part II) and COBRA Compliance Strategies",
            'start' =&gt; "2011-11-17",
            'url' =&gt; "/www/conferences/conference.php?ID=1136"
        ),

        array(
            'id' =&gt; 1154,
            'title' =&gt; "Making the Most of your Membership",
            'allDay' =&gt; false,
            'start' =&gt; "Wed, 18 Nov 2011 11:00:00 EST",
            'url' =&gt; "/www/conferences/conference.php?ID=1154"
        ),
        array(
            'id' =&gt; 1137,
            'title' =&gt; "2011 Annual Human Resources Conference",
            'start' =&gt; "2011-11-29",
            'url' =&gt; "/www/conferences/conference.php?ID=1137"
        ),


    ));
</code></pre>

<p>When trying to mimic this array structure, I'm using this:</p>

<pre><code>$conferences = dbStoredProc('cp_meeting_get_list_new');
$events = array();

foreach ($conferences as $c){
    $push = array(
        'id'        =&gt; $c['ID'],
        'title'     =&gt; $c['name'],
        'start'     =&gt; date("Y", $c['epochDate']) . "-" . date("M", $c['epochDate']) . "-" . date("d", $c['epochDate']),
        'url'       =&gt; '/events/details.php?id' . $c['ID'],
    );
    array_push($push, $events);
}
echo json_encode($events);
</code></pre>

<p>When I echo out my <code>$events</code> variable I get <code>[]</code>.</p>

<p>Any ideas?</p>
