I know, this might sound like a "brainless question", but its really not. :o
I basically know what a few PHP symbols mean; variables, blocks, functions, operators, etc. But I primarily want to know is in what order does an experienced PHP programmer break down all this code? -How exactly does a experienced PHP programmer seperate his code into sections so it can be clearly (and less confusingly) interpreted?
Do you usually start by looking at each function and then moving on to the operators? Or reverse?
I know there's gotta be a better way to read it then how I do it, I'm doing something wrong... because when I read elimentary PHP scripts I look at the WHOLE thing, and it takes me longer to figure out what exactly the script is trying to do.
Here is one such example script:
<?php
$number = 7;
if($number == 6)
{
echo("The number equals 6.<br />");
}
if($number != 6)
{
echo("The number doesn't equal 6.<br />");
}
if($number < 6)
{
echo("The number is less than 6.<br />");
}
if($number > 6)
{
echo("The number is greater than 6.<br />");
}
if($number <= 6)
{
echo("The number equals or is less than 6.<br />");
}
if($number >= 6)
{
echo("The number equals or is greater than 6.<br />");
}
?>
It would really help me out if you experienced programmers could tell me how you read this. Where did you start? And what did you look at last of all? Thanks. 🙂