DotDragnet
May 24, 2012, 05:27:21 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Mobile users - Our forum is Tapatalk enabled. http://www.tapatalk.com/
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Utterly lost the plot with arrays  (Read 169 times)
Charisma Bypass
Hero Member
*****
Posts: 556



View Profile Awards
« on: July 12, 2011, 06:41:48 PM »

$this->domestic_types = array(
             '01' => 'Priority (by 10:30AM, later for rural)',
             '03' => '2 Day Air',
             '05' => 'Standard Overnight (by 3PM, later for rural)',
             '06' => 'First Overnight',
             '20' => 'Express Saver (3 Day)',
             '90' => 'Home Delivery',
             '92' => 'Ground Service'
      );

Instead of that, I want to do this:

$this->domestic_types = array();

and then add the others into it, one by one.

Should be easy, but cannot see the woods for the trees Sad

Thanks in Advance.
Logged
Charisma Bypass
Hero Member
*****
Posts: 556



View Profile Awards
« Reply #1 on: July 12, 2011, 07:18:09 PM »

Ug.  Please can I go to bed.

 $result = array();
           
 $result['01'] = 'Priority (by 10:30AM, later for rural)';
 $result['03'] = '2 Day Air';
 $result['05'] = 'Standard Overnight (by 3PM, later for rural)';
 $result['06'] = 'First Overnight';
 $result['20'] = 'Express Saver (3 Day)';
 $result['90'] = 'Home Delivery';
 $result['92'] = 'Ground Service';

 $this->domestic_types = $result;
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!