html - How can I get the width and height of a div(item class) using PHP?
Solution:
As far as I know You can't and you don't have to use PHP to get this type of data because PHP is a server side language at least you can assign a fixed width and then use this variable on your language, but usually you have to use a scripting language to work with object rendered in the DOM tree.
Your PHP code arrives from the server so it has no access to this information since the DOM is part of the browser (Client)
Answer
Solution:
PHP is a server side language , I doubt you can use it to obtain the height of a division. However, you can use jQuery to do that:
var height=$(".item").height();
var width=$(".item").width();
Source