How to detect a mobile browser using PHP in content?
Mobile detection isn't built into Drupal or most popular themes (I think Adaptive Theme does, though).  You need to install a contrib module to do this.  Three options are Browscap, Mobile Tools, and Mobile Detect.  Where you go from here depends on which module you are using.