-- I know "THIS" forum clearly isn't the place for PHP questions, but you seem to know what you're doing, so yeah.
I was curious if there was a way to do multiple
IF checks in one file.
<?php
$random = rand(1, 3);
$color[1] =("FF0000");
$color[2] =("00FF00");
$color[3] =("0000FF");
$useColor =("$color[$random]");
if ($useColor == FF0000){
$title =(" RED ");
}
if ($useColor == 00FF00){
$title =(" GREEN ");
}
if ($useColor == 0000FF){
$title =(" BLUE ");
}
echo "<h2 style=\"color:";
echo htmlspecialchars($color[$random]);
echo ";\"> \n"
echo "The Random Color Chosen Was .. ";
echo htmlspecialchars($title);
echo "</h2>";
?>
<?php
$random = rand(1, 2);
$color[1] =("FF0000");
$color[2] =("0000FF");
$useColor =("$color[$random]");
if ($useColor == FF0000){
$title =(" RED ");
} ELSE {
$title =(" BLUE");
}
echo "<h2 style=\"color:";
echo htmlspecialchars($color[$random]);
echo ";\"> \n"
echo "The Random Color Chosen Was .. ";
echo htmlspecialchars($title);
echo "</h2>";
?>
<?php
// If the color found isn't red, it must be blue. You cannot do this three times.
// ^^ #2 Maximum two colors, and from my knowledge you cannot have;
//    -- ------- --- ------  --- ---- -- --------- --- ------ ----
// IF ($LOREM == $IPSUM){
//    IF ($DOLOR == $SIT){
//      DO FUNCTION();
//    }
// }
// (check) IF VARI01 == VARI02 (do)
//   (another check) IF VARI03 == VARI04 (do)
//     (do -- something)
//   (finish doing)
// (finish doing)