php if mobile_device_detect is true conditional statement

admin

Administrator
Staff member
I don't understand PHP very well... not good start I know.

I'm using <a href="http://detectmobilebrowsers.mobi/" rel="nofollow">http://detectmobilebrowsers.mobi/</a> for mobile/desktop website, and I'm using wordpress as my CMS.

I have set up my function like so...

Code:
    require_once('mobile_device_detect.php');
    mobile_device_detect(true,true,true,true,true,true,false,false,false);

But now in my theme, I want a conditional statement similar to this...

Code:
    &lt;?php if (is_home()) { ?&gt;

        //Some bits here
    &lt;?php } else { ?&gt;
        //Some bits here
    &lt;?php } ?&gt;

Though I want it to return the values from my function. See below my rubbish attempt below...

Code:
    &lt;?php if (mobile_device_detect==true) { ?&gt;

        //Some bits here
    &lt;?php } else { ?&gt;
        //Some bits here
    &lt;?php } ?&gt;

Obviously this is not going to work lol, but can you see what I'm trying to achieve? and help would be most awesome thanks!

Cheers
Josh