[ create a new paste ] login | about

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

PHP, pasted on Dec 9:
1
2
3
4
5
6
7
8
9
<?php
$a = 100;
$b = 200;
$c = 300;
$max = "a";
foreach(array("a","b","c") as $v){
if($$v > $$max)$max = $v;
}
echo "$max is $$max";


Output:
1
c is $c


Create a new paste based on this one


Comments: