#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    47
    Rep Power
    4

    Display ['currentairline'] in RED


    How do I make currentairline display in RED?

    <?php echo htmlentities($post['currentairline']) ?>

    Thanks,
    Scotty
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,332
    Rep Power
    594
    PHP Code:
    <?php echo "<font color=\"red\">".htmlentities($post['currentairline'])."</font>" ?>
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    47
    Rep Power
    4
    Originally Posted by gw1500se
    PHP Code:
    <?php echo "<font color=\"red\">".htmlentities($post['currentairline'])."</font>" ?>
    Thanks,

    You ROCK!

    I was missing \"red\
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,332
    Rep Power
    594
    You have to be careful with double quotes. You could also have done this:
    PHP Code:
     <?php echo '<font color="red">'.htmlentities($post['currentairline'])."</font>" ?>
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    Sydney Australia
    Posts
    182
    Rep Power
    83
    Originally Posted by gw1500se
    You have to be careful with double quotes. You could also have done this:
    PHP Code:
     <?php echo '<font color="red">'.htmlentities($post['currentairline'])."</font>" ?>
    You would also be better to use style, either inline or separate style that the deprecated <font> .

    PHP Code:
     <?php echo "<span style=\"color:red;\">".htmlentities($post['currentairline'])."</span>"?>

IMN logo majestic logo threadwatch logo seochat tools logo