Solved

Including HTML tags in Echo output

Posted on 2007-11-15
2
1,146 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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.

749 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