Solved

Including HTML tags in Echo output

Posted on 2007-11-15
2
1,141 Views
Last Modified: 2013-12-13
I would like to have a conditional echo statement depending on whether a field from a database is not empty.

The code snippet attached works fine - but I would also like to include a <br /> tag as well.

I have tried various variations but can't find the correct syntax.

Many thanks,
<?php if (isset($row_rsCustomer['Company'])) { echo $row_rsCustomer['Company']; }  ?>

Open in new window

0
Comment
Question by:ellisdav44
2 Comments
 
LVL 20

Accepted Solution

by:
steelseth12 earned 125 total points
Comment Utility
<?php if (isset($row_rsCustomer['Company'])) { echo $row_rsCustomer['Company']."<br>"; }  ?>
0
 

Author Closing Comment

by:ellisdav44
Comment Utility
Many thanks !
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

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…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

744 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

13 Experts available now in Live!

Get 1:1 Help Now