WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. layoutlooks
    Member
    Posted 1 year 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
    e.g.
    [ 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.

    http://wordpress.org/extend/plugins/php-browser-detection/

  2. Mindshare Studios, Inc.
    Member
    Plugin Author

    Posted 1 year 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 Studios, Inc.
    Member
    Plugin Author

    Posted 1 year 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

About this Topic