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
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
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.
Use the strong label inside it should go the text you want in bold, the best practice is to do it through CSS.
Sure, do it this way:
echo "<b>{$variable}</b>";
or
echo "<b>Hola Mundo!</b>";