Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the color and font size of my php?it is not working if i try [closed]

I've been looking for ways to change the size and font of my php code output and can't find a way that doesn't cause errors. I want all of the following php code to appear white and enlarged:

<?php
  if (isset($_SESSION['something'])) {
    echo "Welcome " . $_SESSION['something'] .  ", <a href='something.php'>something</a>";
  }
?>

If anyone can help me with with achieving this that'd be great. So far I've tried font-color and color-span but neither have worked.

like image 744
darkwing Avatar asked Feb 08 '23 11:02

darkwing


1 Answers

Wrap your code into a span or div tag, and apply some CSS styling to it.

For example:

<?php
        if (isset($_SESSION['something'])){
            echo '<span style="color: white; font-size: 20px;">Welcome ' . $_SESSION['something'] .  ', <a href="something.php">something</a></span>';
        }
?>
like image 133
Milkmannetje Avatar answered Feb 11 '23 01:02

Milkmannetje