Solved

Including HTML tags in Echo output

Posted on 2007-11-15
2
1,147 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

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…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

691 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