PDA

View Full Version : Whats the best book for learning php basics


bashy
01-03-2007, 04:30 PM
Hi peeps

Can anyone advise the bast book/ebook to get that will show me from the very beginning as to what all the variables mean and stuff like that...

I have found 2 but the code is different to vb, for example:

an if statment in vb is like this: <if condition....> blah blah blah </if>

in the books its:

if ($score > 92 )
{
$grade = “A”;
$message = “Excellent!”;
}
elseif ($score <= 92 and $score > 83 )
{
$grade = “B”;
$message = “Good!”;
}
elseif ($score <= 83 and $score > 74 )
{
$grade = “C”;
$message = “Okay”;
}
elseif ($score <= 74 and $score > 62 )
{
$grade = “D”;
$message = “Uh oh!”;
}
else
{
$grade = “F”;
$message = “Doom is upon you!”;
}
echo $message.”\n”;
echo “Your grade is $grade\n”;

Theres no <> bracket things and no /if to finish the statement.

So a book that will actually show/teach exactly what the php in vb is about please?

Guest190829
01-03-2007, 09:34 PM
Those if/else statements are correct PHP code. The <if condition=""> are called template conditionals in templates. The is a section in the manual for them:

http://www.vbulletin.com/docs/html/template_conditionals

bashy
01-04-2007, 05:20 AM
Are ok thanks Danny, just didnt want to be reading the wrong books :o
Thanks again :)

RedTyger
01-04-2007, 09:47 AM
<a href="http://www.hudzilla.org/php/" target="_blank">http://www.hudzilla.org/php/</a>