I don't know why it's happening I'm unable to print the value of color in my PHP code.
<?php
$x=array("red","blue","pink");
echo"Color names are <br>";
foreach(x as value){
echo "$value <br>";
}
?>
CodePudding user response:
Please correct this
<?php
$x=array("red","blue","pink");
echo"Color names are <br>";
foreach($x as $value){
echo "$value <br>";
}
?>
CodePudding user response:
If you want to learn PHP please switch on showing errors and warnings. It will help you.