You have a good knowledge of HTML and CSS, so you know these two languages are not programming languages, but languages simple static display.
Easy for you to view a web page that says "hello is Monday." The only concern is that there will always be on your page Monday ...
Not all that dynamic. This is where PHP is a web programming language. It produces HTML.
How is it useful?
Because the HTML produced by PHP changes depending on the circumstances you have programmed.
We will say that it introduces dynamism into the web page.
I - C - When PHP involved ? :
The PHP code that you inserted into your pages each load acts (and cooling) web page. This is to relativize the "dynamic".
The interactivity with the user is limited to certain user actions.
A page refresh is for example the user click on the button 'submit' included in a form tag, or a first arrival on a web page.
I - D - A touch of algorithmic :
It should finally be addressed in this introduction four key concepts of programming.
I - D - 1 - First the concept of variable .
One example will suffice. We all had the hands false advertising custom type:
"Hi Catherine
You have earned our extra-leather sofa in the draw of 24/01/2012. "
It is clear that the company sends this pub has a database with lots of names. And it's an automatic program that stores the values of Ms, Catherine, and the date into variables. The rest of the text is fixed. We will say that civility, name and date are variables ...
I - D - 2 - Programming .
Else, set it to a sequence of instructions to the machine. Exactly as they would construct a recipe. Except that we write the recipe for the use of a machine that only understands the binary and an instruction at a time. We advance, we advance, instruction by instruction, in a linear method. In the structure of the program, two types of construction may deviate from this linearity:
I - D - 3 - The instruction loop .
It was a terribly repetitive action. Like, cut the three chocolate bars in individual squares. In programming, we will not say 150 times, off the square of chocolate, off the square of chocolate, off the square of chocolate ...
So we will do what is called a loop (there are several kinds), such as:
A loop because the program reads the condition into the loop after the first hug (if the condition is true) and "loop" as the condition is true ...
I - D - 4 - The instruction provided .
It was a condition. Remain on our recipe for chocolate mousse.
If I have 6 hungry, I break eight eggs, if I have six people on a diet, I break 4 eggs, but by default, good foam is 6 for 6 eggs ...
This time you will understand that the logical line splits into three parallel tracks, like the rails, then together again at the end.
The program should move as one and only one of three ways.
The program should move as one and only one of three ways.
I - D - 5 - To enter the programming .
Program is ultimately bring any problem to one of three options:
- A statement that runs automatically,
- An instruction that runs as many times as necessary in a loop,
- An instruction that executes in a condition.
Add to this a number of variables that are manipulated happily ... And you have the outline of the programming.
- A statement that runs automatically,
- An instruction that runs as many times as necessary in a loop,
- An instruction that executes in a condition.
Add to this a number of variables that are manipulated happily ... And you have the outline of the programming.








0 comments:
Post a Comment