Same as css media queries, but server-side


I was wondering how you’d mimic the following bit of css code with php:

@media screen and (max-device-width: 480px) {


I have found a couple of classes / snippets that detect mobile devices, but I was wondering if there was a very short approach to the problem.



You cannot mimic it.