How to make PHP text BOLD?

Posted on 2011-10-06
Last Modified: 2012-06-27

How do I make the text bold
$fs = $form->addElement('fieldset')->setLabel ('CAR ID');

Thanks, Missymadi
Question by:missymadi
    LVL 82

    Accepted Solution

    Actually, you are making HTML text bold so it would be:
    $fs = $form->addElement('fieldset')->setLabel ('<b>CAR ID</b>');

    I'm not familiar with that construct so I don't know if it will put the 'label' into a 'legend' tag.
    LVL 36

    Assisted Solution

    by:Loganathan Natarajan
    Find out if there any method available to make bold on the same class itself,

    Some thing like, "setLabelBold"

    $fs = $form->addElement('fieldset')->setLabelBold ('CAR ID');


    Assisted Solution

    Actually there are several ways to approach this.

    Firstly, in the function SetLabel('CAR ID');
    You could simply replace it as Firstly, in the function SetLabel('<b>CAR ID</b>');

    However, if let's say you are using this label elsewhere in your code
    and that's where you require it to be bold, you can do something like
    echo '<b>';
    This is where you place the label
    echo '</b>';

    Hope this helps to solve your problem.
    LVL 107

    Assisted Solution

    by:Ray Paseur
    PHP is a server-side scripting language.  HTML is a client-size markup language.  PHP generates HTML and sends it to the client.  There are two HTML tags commonly associated with bold text.  These are <b> and <strong>.  There is a thing called CSS that is used to add "style" to the markup.  (Markup is semantic, style is visual).  You might add a <span> tag with the name of a CSS class that includes bold text.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now