How do I conditionally display text on a PHP page of MySQL results that uses the following syntax to display data already <?php echo($row_Rep_Locator['Country']); ?>
In this case, I want to show text “hello world” at the bottom of the page ONLY if the Country is equal to United States for example?
You could use a
switch():This solution is especially faster if you want to check many different conditions, usually at about 3 if clauses.