Put this code somewhere where it will output into the HTML section.
if (isset($_SERVER['HTTP_USER_AGENT']))
{
   $ua = strtolower($_SERVER['HTTP_USER_AGENT']);

   if (strpos($ua, 'ipad') !== false || strpos($ua, 'ipod') !== false || strpos($ua, 'iphone') !== false)
   {
       print '<meta content="width=device-width; initial-scale=1.0;" name="viewport" />';
   }
}
Example website where this fix works: www.meishapersonaltrainer.com