Checking your cell phone with php



if(is_mobile AND vertical){
echo “This is a phone and vertical”;
}elseif(is_mobile AND horizontal){
echo “This is a phone and horizontal”;
echo “This is a desktop”;


Adem, what is your question?

If you mean is there a way to tell of you are on a phone, yes, you can use CSS or Javascript.

I would suggest you look into using a library like BootStrap as it allows you to set up sites that check for phone layouts first and can adjust your site to fit and work better on phone. It requires little overhead other than thinking out the site’s layout before you start designing it. Might help.