?
Solved

How to make PHP text BOLD?

Posted on 2011-10-06
4
Medium Priority
?
607 Views
Last Modified: 2012-06-27
Experts,

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

Thanks, Missymadi
0
Comment
Question by:missymadi
4 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36928070
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.
0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 500 total points
ID: 36929006
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');

0
 

Assisted Solution

by:njain1985
njain1985 earned 500 total points
ID: 36929379
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.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 500 total points
ID: 36931007
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.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

840 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