Order by number

I have 4 variables like the below.

[b]code[/b]

$a=48;
$b=9;
$c=52;
$d=183;


I like to produce “9 48 52 183” with the code above.

The would-be code below doesn’t work correctly, but I hope it shows what I want.

[b]would-be code[/b]

echo [COLOR="#FF0000"]order[/COLOR]($a, $b, $c, $d);

[b]target result[/b]
9
48
52
183

How can I get my target result above with the 4 variables?

I guess one way is to put them in an array:


$a=48;
$b=9;
$c=52;
$d=183;

$e = array($a, $b, $c, $d);

sort( $e );

foreach($e as $f){
echo $f . PHP_EOL;
}

Kinda begs the question why can you not assign them to an array as you get these figures?

$a = where ever you got this number from