0

This is what I want: $Variable = 3; I want to change this number to a 1 on a mobile

So I was hoping to do something like this:

if ((@media only screen and (min-width:481px)) or (@media only screen and (min-width:981px)){ $Variable = 3; } else $Variable = 1;

I'll try to explain;

When changing from an iPad or desktop screen size I want the value of the variable to change from 3 to 1. Thats why I was hoping to use an if statement.

Is this possible? Or do i need to use css in some way? Any help welcome

Ria
  • 532
  • 5
  • 22
  • Css cannot remove columns, only make them invisible. You could use the table selectors and remove the columns using `display: none;` – Phiter Oct 24 '16 at 10:11
  • This is not for a column i just called the variable column. All i want to do is change the value of the variable in different media – Ria Oct 24 '16 at 10:15
  • Ohh you're trying to do this by using PHP. You can't. – Phiter Oct 24 '16 at 10:16
  • See this [Getting the screen resolution using PHP](http://stackoverflow.com/questions/1504459/getting-the-screen-resolution-using-php) – Phiter Oct 24 '16 at 10:16

0 Answers0