how would you calculate number of characters that fits to screen (and possibly just in one table field) in PHP? Thanks a lot, I have no idea how to do it.
Asked
Active
Viewed 28 times
0
-
2First figure out how wide screen is (if that is even possible in PHP), then figure out how wide one character is (monospace fonts are your friend), third divide the one by the other – kero Jun 27 '15 at 12:55
-
2It is not possible to get the screen resolution just with PHP. You would need JavaScript for this. http://stackoverflow.com/questions/1504459/getting-the-screen-resolution-using-php – devz Jun 27 '15 at 12:57
-
Thank you for ideas, my current problem is how to determine character width... – david8 Jun 27 '15 at 14:28