Style in PHP file

0

I'm starting on the php and I have a question. Can you give style to print with echo, I want to put a phrase in bold and I would like to do it without resorting to the css. It's possible? Thanks

    
asked by Time007 10.10.2018 в 20:30
source

3 answers

0

If you can calmly assign it style with the style attribute like this:

<?php

$texto = "php <b>html</b> python <span style='color:red; font-weight: bold;'>java</span>";

echo $texto;

?>

As you can see you can put bold with the <b> tag or by applying the style attribute inside an HTML tag and give it the css attributes there.

    
answered by 10.10.2018 / 20:38
source
0

Use the strong label inside it should go the text you want in bold, the best practice is to do it through CSS.

    
answered by 10.10.2018 в 20:38
0

Sure, do it this way:

echo "<b>{$variable}</b>";

or

echo "<b>Hola Mundo!</b>";
    
answered by 10.10.2018 в 20:39