2014-09-01 17:19
浏览 359


That's how my code looks like:

if (in_array($name, $blacklist)) {
    echo "Admins cannot be resolved. $name BLACKLISTED! ";
} else {
    $api1 = file_get_contents("http://www.abrasivecraft.com/api.php?cmd=10&username={$name}");
    echo "$name 's IP is: $api1";

where it says :" { echo "Admins cannot be resolved. $name BLACKLISTED! "; } "

I want this output to be centered, bold and colored in red, also I want it to appear below the box where I enter the username in the following screenshot,that's how it looks like when I enter this blacklisted name.


NOTE: I've seen this PHP Echo text Color But didn't help me at all...

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • donglian5309 2014-09-01 17:24

    One way to do it would be.

        echo "<div style='display: block; color:red;'>Admins cannot be resolved. " . $name . " BLACKLISTED!</div>";

    ( but you should look more into html & css )

    打赏 评论

相关推荐 更多相似问题