Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

mobile view variable on PHP

Hi guys,

Im trying to develop mobile plugin for myself, may i know if there's a global variable that helps you distinguish if the view the user is using is mobile?
ex.

`if( $mobileviewvariable == "yes") {
// i could do anything i want for mobile view

}`

i need to know what $mobileviewvariable the actual variable is.

Comments

  • peregrineperegrine MVP
    edited December 2012

    no variable per se. only a function ismobile() and the cookie and the useragent. where to find the info (search) is in the last 5 or six recent discussions this month.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • You want:

    if(IsMobile()) {

    }

  • fr3em1ndfr3em1nd ✭✭
    edited December 2012

    where to find the info (search) is in the last 5 or six recent discussions this month.

    @peregrine yep, i just had a bad keyword since i actually dont know the actual question to be asked up until now :)

    thanks @Lincoln

Sign In or Register to comment.