From PHP Manual

At beginning, one of my friend said to me, ” I should read the PHP Manual“. But, I found on Chapter 2: A Simple Tutorial they said, “…We have an if statement. If you are familiar with the basic syntax used by the C language, this should look logical to you. Otherwise, you should probably pick up an introductory PHP book and read the first couple of chapters, or read the Language Reference part of the manual.”. Hope you got my points.

However, on chapter they introducing with variables.
<?php echo $_SERVER[‘HTTP_USER_AGENT’]; ?>

On that codes you will see $_SERVER is a variable and that will handle PHP automatically.
After the execution you will see Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008092417 Firefox/3.0.3

Note that the result will be vary and based on your system and browser versions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s