Ok, following is the code for placing ordinal suffixes to certain variables and so I'm trying to understand how it works.
$test_c = abs($ranking) % 10;
$ranking_suffix = ((abs($ranking) %100 <21> 4) ? 'th' : (($test_c < 4) ? ($test_c < 3) ? ($test_c < 2) ? ($test_c < 1)
? 'th' : 'st' : 'nd' : 'rd' : 'th'));
Basically, its taking the value of $ranking and making it absolute but I've no idea what % 10, % 100, <21> 4 means.
Then it runs several conditions to test this variable and assigning the relevant suffixes.
How do these conditions work? ie. what does the first part preceding ":" do and if ($test_c < 4) what happens?
Thanks for your guidance.