A
Anonymous
Guest
The www is teaching me PHP. I am a beginner!
I wanted to know why does php use '$' in front of variable names?
It certainly makes them easier to spot, but is there a syntatical reason?
Are there any laws about variable names?
(I know this is a base question , but every answered question helps!)
<?php
$Lyndsey = 'confused';
If ($Lyndsey=='confused')
{
Echo "Lyndsey understands, but is mostly confused!";
}
else
{
Echo "Lyndsey is not confused.";
}
?>
I wanted to know why does php use '$' in front of variable names?
It certainly makes them easier to spot, but is there a syntatical reason?
Are there any laws about variable names?
(I know this is a base question , but every answered question helps!)
<?php
$Lyndsey = 'confused';
If ($Lyndsey=='confused')
{
Echo "Lyndsey understands, but is mostly confused!";
}
else
{
Echo "Lyndsey is not confused.";
}
?>