PDA

View Full Version : PHP: syntax elements and expressions?


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

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

<?php
$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;

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