View Review Details


Book:   Programming PHP
Subject:   Re: A comment about the style
Date:   2008-11-17 19:35:41
From:   cambridge
Response to: A comment about the style

its simple only create a typical php file and then you see that the code sample is a simple code:
< ?
function update_counter () {
static $counter = 0;
$counter++;
echo "Static counter is now $counter\n";
}
$counter = 10;
update_counter();
update_counter();
echo "Global counter is $counter\n";
? >


This results in
you will see the output:


Static counter is now 1
Static counter is now 2
Global counter is 10


The simple code expect the knowledge of the simpliest way of computing: code and output


The fully simple knowledge is: input - code - output