If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Member Cranavvo's Avatar
    Join Date
    Sep 2013
    St. Helens, England
    Member #
    11 times

    PHP Tutorial 1 - Printing

    PHP is a server-side development language created by Rasmus Lerdorf. PHP is one of the most popular server-side web development languages to be used on the internet because of powerful processing time and efficiency.

    PHP has to be installed on your web-server for it to function. If you haven't got a web server you may want to reconsider downloading a free-to-use one before reading more.

    PHP files are commonly shown as .php. Some older versions of PHP may have to be used as an extension concatenated with the version they were coded to function on, e.g. .php2.

    PHP is not an easy-to-grip language at first; if you lack patience then PHP is not the language for you.

    The first thing we're going to learn is echo; and die; which are two very different functions within PHP.

    echo; is PHP's way of printing text on the screen, for e.g.
    PHP Code:
    echo "Hello WDF!";

    Hello WDF!
    die; however does differently. echo; prints text and allows other parts of PHP to be executed when die; is executed anything below it is ignored / the script dies, for e.g.

    PHP Code:
    echo "Hello WDF!";
    "You all suck!";

    Hello WDF!
    You can also kill a script and output that you've done so:

    PHP Code:
    echo "Hello World!\n<br />"// \n is new line
    die("Script has just been killed!");
    "Bye World!";

    Hello World!
    Script has just been killed!
    These are the two most basic and used functions in PHP and the easiest to learn. Thanks for reading.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 09:51 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: