• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1159
  • Last Modified:

Including HTML tags in Echo output

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
ellisdav44
Asked:
ellisdav44
1 Solution
 
steelseth12Commented:
<?php if (isset($row_rsCustomer['Company'])) { echo $row_rsCustomer['Company']."<br>"; }  ?>
0
 
ellisdav44Author Commented:
Many thanks !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now