I need to change the value of the variable of a function according to the resolution of the screen (when reducing the screen the value will have to be updated immediately). Is it possible to change this value through CSS media queries?
That is, something like this with css:
@media only screen and (max-width: 1065px) {
$variavel = 3;
}
@media only screen and (max-width: 769px) {
$variavel = 2;
}
To retrieve the value in php:
catalogo($variavel)
;
Is there any way to do this?
Thank you