PHP Browser Detection
[resolved] More detailed php [ if / else ] statement examples please!? (3 posts)

  1. layoutlooks
    Posted 3 years ago #

    I like the look of this plugin a lot, and it has installed quickly and easily but I cannot get it to run... I'd like to run a bunch of if/else statements checking for mobile phones
    [ If Andriod or iPhone ] then run this bunch of html and php to generate a section of page layout, [ else ] display the regular html and php...
    [ end if/else php ]

    As you might have guessed, I'm not a PHP programmer, more a html/CSS graphic designer. So placing this: <?php if ( is_iphone($version) ) { do stuff }; ?> in my page is only giving me errors.

    Can anyone please help me with some example code. I'd be very grateful.


  2. Mindshare Labs, Inc.
    Plugin Author

    Posted 3 years ago #

    Sorry for the delay... I just released an update with the latest available browser capabilities file. Let me know if that solves your issue.

  3. Mindshare Labs, Inc.
    Plugin Author

    Posted 3 years ago #

    Sorry my last remark wasn't really appropriate for your question...

    You could try something like this:

    <?php if(is_iphone()) : ?>
    Hey nice iPhone.
    <?php else : ?>
    Not using iPhone.
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • PHP Browser Detection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic