I'd like to find user's screen resolution (width) first then call my different php function.
Can you tell me how to do it?
You cant really, however here is something that does get it in PHP not sure on requirements
http://techpatterns.com/downloads/php_browser_detection.php
Also another way is Javascript. Just remember that although the PHP script may seem to work it wont be exact for everybody.
problem resolved!