You need to use braces, and correct the for loop:
<?php
$A1 = 'Dog';
$A2 = 'Cat';
$A3 = 'Horse';
for ($i = 0; $i <= 15; $i++) {
echo ${'A' . $i};
}
?>
or perhaps
<?php
$A1 = 'Dog';
$A2 = 'Cat';
$A3 = 'Horse';
for ($i = 0; $i <= 15; $i++) {
if (isset(${'A' . $i}))
echo ${'A' . $i};
}
?>
That said, why not use an array?