From PHP Manual

by Sakib on 9/11/2008

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:1.9.0.3) Gecko/2008092417 Firefox/3.0.3

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

isakib+admin@gmail.com

There is 1 comment in this article:

  1. 14/11/2008PHP For Newbie « the php inspiration says:

    [...] problem on that example -i’ll digg more). Thing is that you can’t stop to reading the PHP manual and it’s so helpful in different times. Don’t follow me – i would like to follow [...]

Write a comment:

 
More in Programming (4 of 8 articles)