Q How can we display $_SERVER variable ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: To display this variable-

Example:-  Printing a ws variable (Array element):-

<?php
echo $_SERVER['HTTP_USER_AGENT'];
?>
A sample output of this script may be:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Comments

Comments are closed.

© PHPInterviewQuestion.com 2009 - 2012

eXTReMe Tracker