Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 2
    Are you trying to just return the screen width? Right now you're trying to cast a string that's full of text into an integer in the example you've given... what are you expecting the integer output to be? Commented Apr 19, 2011 at 21:31
  • How can you get 1024 printing $width_s??? You can't mix server-side and client-side code this way. Commented Apr 19, 2011 at 21:32
  • 1
    (int)"anything that doesn't start with a number" always evaluates to 0. What are you actually trying to accomplish? Getting the screen.width?? Commented Apr 19, 2011 at 21:33
  • but i get " $width_s" this value. If you don't believe, try my code :) Commented Apr 20, 2011 at 6:36
  • 1
    This is one of the reasons why I ignored the php tag. (Not the question or the answers, but these comments.) Commented Apr 20, 2011 at 10:20