Order by number

I have 4 variables like the below.



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]

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

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


$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