You can't tell if a browser has JS enabled, but you can tell if the browser supports JS http://php.net/manual/en/function.get-browser.php
$js_enabled$js_capable = get_browser(null, true)=>javascript == 1
Having said this, youthat's probably not of much use. You should reconsider whether detecting jsJS from php is a good thingPHP. There should be no need for it if you use progressive enhancement, meaning that JS only adds functionality to what's already on the page.