View Full Version : PHP: syntax elements and expressions?

09-30-2015, 03:25 PM
Question one.
What are the syntax elements you see in this code sample below?

Would I be correct to say '$a=1'?

$a =1;

Question two.
What are the expressions in this code sample?

$valueA = 5;
$valueB = 3;

if ($valueA > $valueB) {
echo 'Value A is greater than Value B </br>';
// Outputs the string, appends a html </br>; tag
$valueA= $valueB; //Assigns the value of B to A
echo "value A is not equal to: $valueA"; // outputs the string

Would it be: $valueA = 5; $valueB = 3;

10-01-2015, 01:10 AM
of course just echo them out. what are you actually trying to do?