function to append "a" or "an" to the front of a number as appropriate
Rather than having many return statements I would keep the logic that determines whether it should be 'a' or 'an' together.  I think it is actually easier to understand reading the ANDs and ORs than spread out if and else statements.

I prefer not to create temporary variables that are not used for anything - so I wouldn't create $verA and $verAn.  I do however create a variable for $numComma.  By having this we avoid calling number_format more than is necessary.

This is how it looks my way:

function prefixAAnToNumber($num)
{
    $prefixAn = array(8, 11, 18, '8', '11', '18');
    $numComma = number_format($num);

    if (in_array($num, $prefixAn) ||
    (strlen($num) &gt; 1 &amp;&amp;
     (substr($numComma, 0, 1) == '8' ||
      (in_array(substr($numComma, 0, 2), $prefixAn) &amp;&amp;
       substr($numComma, 2, 1) == ','))))
    {
        return 'an ' . $numComma;
    }

    return 'a ' . $numComma;
}