Solved

Including HTML tags in Echo output

Posted on 2007-11-15
2
1,145 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
ID: 20291368
<?php if (isset($row_rsCustomer['Company'])) { echo $row_rsCustomer['Company']."<br>"; }  ?>
0
 

Author Closing Comment

by:ellisdav44
ID: 31409396
Many thanks !
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

839 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