This is from a tutorial for php, I cant understand the use of the ternary ? And the use of the colon : Can you please explain to me the use of the colon in here thanks I tried to read the tutorial and php reference but couldn't understand it
This code will print a side way pyramid
for ($row = 1; $row <= 5; $row++)
{
for ($col = 1; $col <= ($row > 3 ? 6 - $row : $row); $col++)
{
echo '*';
}
echo "<br>";
}