[ create a new paste ] login | about

Link: http://codepad.org/PDPEjAGJ    [ raw code | output | fork ]

sequoia - PHP, pasted on Oct 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

$suppliers = array(
  'Utility Warehouse' => array('Gas' => array(0,0), 'Electricty' => array(0,0)),
  'British Gas' => array('Gas' => array(93,124), 'Electricty' => array(93,124)),
  'Eon' => array('Gas' => array(93,124), 'Electricty' => array(93,124))
);

foreach($suppliers as $location => $utility){
    echo $location . "\n";
    foreach($utility as $name => $numbers){
        echo "$name: $numbers[0]-$numbers[1] ";
    }
    echo "\n\n";
}


Output:
1
2
3
4
5
6
7
8
9
Utility Warehouse
Gas: 0-0 Electricty: 0-0 

British Gas
Gas: 93-124 Electricty: 93-124 

Eon
Gas: 93-124 Electricty: 93-124 



Create a new paste based on this one


Comments: