WordPress.org

Support

Support » Plugins and Hacks » [Resolved] More detailed php [ if / else ] statement examples please!?

[Resolved] More detailed php [ if / else ] statement examples please!?

  • layoutlooks
    Member

    @layoutlooks

    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mindshare Labs, Inc.
    Participant

    @mindshare

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

    Plugin Author Mindshare Labs, Inc.
    Participant

    @mindshare

    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; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] More detailed php [ if / else ] statement examples please!?’ is closed to new replies.