• [TUTORIAL] PHP: The Basis [Noob Friendly]

    Aleisha Member

    I made this tutorial about PHP because it often regarded as something dificult..
    With my “experience” i’ll give you people a short demonstration and some explanation

    DFQ is PHP?
    PHP is a dynamic language to create websites, it sounds dificult but it is kinda easy if you understand it.

    How does PHP works?
    With a browser you can call a url, this concerns in our case to a php file on the server. The script of this php file is executed and is based on data generated with a html page, but you can also create or modify images. And there are many more applications. But as for those generated HTML pages, it is returned to the browser of the visitor who will convert the html to a web page.

    There are even MANY more languages than PHP, so why PHP?

    Because PHP is most generally known. And most clubs are ready to give you help or ready and made scripts. The best part of course is, when you finally have a script ready that you can be proud off! You can of course submit your script again to other scripters.

    Enough of talking lets start with the basics

    1. Echo

    We are starting with the basic “Echo”


    What you see first is the start tag which started a php script . These start and shut-tags are designed to activate in the associated file. PHP as it were This allows PHP work can do, if prompted.

    The echo function lets you print as it were, the information on the page. Always connect a function with “;” (semicolon)

    The result will be


    You can also add html in to a echo, but there are some rules..


    Now in PHP


    This is false!
    You need to escape the quotes with a backslash “\”

    Correct way


    You can also open it with single quotes i recommend this


    Sometimes you have your variable (we come back to this later, you can also view this particle after laerning of the variables) should give in your contect. For example:

    You have specified $number as number

    You can not just make up ultrasound an then neatly open etc… That will give errors. In this case you have to call a variable in the following way:


    As you can see in this example, this works in both single and double quotes.. As output (the two lines above the following lines) 2 times the same so:

    You have 12 specified.
    You have 12 specified.

    Well this was part 1, ill upload the second part soon..

Viewing 0 reply threads
  • You must be logged in to reply to this topic.