News for hackers. Stuff that matters.
Re:Short array syntax finally in PHP 5.4 by joelhaasnoot on Sunday July 24, 2011 @10:23AM (#2799427)
Your example would work, but there's a reason you might want different keys. My company's current web app is written in CakePHP, which has a love for arrays. Some of my queries look like this:

  $booking = $this->Booking->find('first', array('conditions' => array('Booking.booking_id' => $id), 'contain' => array('Review', 'Desk' => array('fields' =>
 array('provider_id', 'category_id'), 'Provider' => array('city', 'name'), 'ProviderCategory' => array('fields'   => array('provider_id', 'category_id'), 'DeskCategory' => 'name')))));
It's essentially not readable, but with [] it would work much better, and I still want to give keys to arrays.
Re:Short array syntax finally in PHP 5.4 by josegonzalez on Sunday July 24, 2011 @11:44AM (#2799578)
As an FYI, you might want to look into custom find methods if you haven't already: https://github.com/josegonzalez/documentation/blob/master/03...