You have to specify the
align
attribute within a tag because it is an attribute and not a tag. But the
align
attribute is deprecated. Use CSS styles instead:
echo '<td>'.$arr['BoysName'][$i].'<div style="text-align:right;float:right;"> ♥</div></td>';
The
float:right
style is necessary to avoid line breaks. It should be sufficient to use only that style and omit the
text-align
.