<!DOCTYPE html>
<html>
<body>
<?php
$num1 = 12;
$num2 = 24;
$min = ($num1 < $num2) ? $num2: $num1;
echo "Common Divisors of $num1 and $num2:<br>";
for($i=1; $i<=$min; $i++)
{
if(($num1 % $i == 0) && ($num2 % $i == 0))
echo "$i ";
}
?>
</body>
</html>