[ create a new paste ] login | about

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

martin@mustbebuilt.co.uk - PHP, pasted on Oct 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
$type = 'box';
switch ($type){
	case 'box':
		$postage = 2.5;
		break;
	case 'package':
		$postage = 1.5;
		break;
	case 'firstClass':
		$postage = 50;
		break;
	default:
		$postage = 0.25;
}
echo $postage;
?>


Output:
1
2.5


Create a new paste based on this one


Comments: