Jump to content

- - - - -

[PHP] - [Extreme Basic's] - [ltjfansite]

  • Please log in to reply
1 reply to this topic

#1 _*ltjfansite_*

  • Guests

Posted 05 September 2004 - 11:18 AM

This Tut Was Writen By Freendom Of Zanmato Design and i had permision to post this tut.

You can find the ut on this page here
Click here


These are the extreme basics... good for if this is your very very first time trying to learn php


First off, all the PHP code goes between two php tags: <?php and ?>. Example:
// All php coding here
Incase you are wondering, the // before the words is so that PHP doesn't execute the words behind it as PHP, it is called commenting. There are two other ways:
    • This comments out the rest of the line from where it starts.
  • # COMMENTSComments out from where you put it for the rest of the line
  • /* COMMENTS */This comments from /* until */. It doesn't comment out the rest of the line like the first two. If you don't remember the */ it will comment out the whole php script.

Now I will explain echo() and print(). What they do is print things on the page. You can use double (") or single (') quotes for either one:
echo 'This is using single qoutes.';
echo "This is using double quotes";
print "Print can do the same things";
You have to escape the same type of quote you used to echo or print whatever with a backslash (\). Here is an example:
echo 'I have to escape the character \' with a backslash.
// Above will output this data:
// I have to escape the character ' with a backslash.


Now the last thing I will explain in this tutorial is strings. Strings hold data, and you can access it any time after you set it's value in the script. You do so like this:
$STRING_NAME = 'The strings data';
You can use double quotes (") or single quotes ('). With double quotes you have to escape other double quotes with a backslash (\). Like this:
$STRING_NAME = "Here is a quite: \"HELLO!\"";
Vise versa with single quotes.


Please post questions below. :P

#2 _*JaK3rIUS_*

  • Guests

Posted 01 February 2005 - 02:23 AM

thanks man. Handy

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users