Need help making a blockquote and line items conditional
Posted on
16th Feb 2014 07:03 pm by
admin
I have some code I bought a few years ago that allows my clients to update content on their site using an Excel spreadsheet. Well this particular application sometimes has line items so I need to come up with a way to do this since it didn't like the fact I put the tags in the echo statement.
Code: <?php echo <h2> $record['header1']; </h2> ?>
<?php echo <p> $record['para1']; </p> ?>
<blockquote><?php echo <li> $record['bullet1']; </li> ?>
<li><?php echo $record['bullet1-2']; </li> ?>
<?php echo <li> $record['bullet1-3']; </li> ?>
<?php echo <li> $record['bullet1-4']; </li> ?>
<?php echo <li> $record['bullet1-5']; </li> ?>
<?php echo <li> $record['bullet1-6']; </li> ?>
<?php echo <li> $record['bullet1-7']; </li> ?>
</blockquote>
<?php echo <p> $record['para1-end']; </p> ?> So I took them out but I'm stuck with having bullet points when I don't want them.
Code: <h2><?php echo $record['header1']; ?></h2>
<p><?php echo $record['para1']; ?></p>
<blockquote><li><?php echo $record['bullet1']; ?></li>
<li><?php echo $record['bullet1-2']; ?></li>
<li><?php echo $record['bullet1-3']; ?></li>
<li><?php echo $record['bullet1-4']; ?></li>
<li><?php echo $record['bullet1-5']; ?></li>
<li><?php echo $record['bullet1-6']; ?></li>
<li><?php echo $record['bullet1-7']; ?></li>
</blockquote>
<p><?php echo $record['para1-end']; ?></p>
Can someone help me add the condition where if there is no data the bullet point doesn't display?
(please ignore my non-compliant code using blockquote instead of UL)
Thanks very much for your time!
No comments posted yet
Your Answer:
Login to answer
328
25
Other forums
PO Release Strategy Issue
Hi Experts,
I am facing an issue related to PO release strategy. The details are-
<
help understanding hidden input w/ php
hello i'm doing a tutorial where there are multiple forms for an edit page for a user to update thei
how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass
Error with Font and imagettfbbox
I keep getting an error that says "Warning: imagettfbbox() [function.imagettfbbox]: Could not f
a multi dimensional array with for each
hi, I have been asked to write an array, I have Zone 2,3,4,5,6,7,8 each zone has 3 sections of weigh
Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added
How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree
php web service error
hey guys,
I'm working on a project requires the use of web services. I've been trying a few tutor
Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret
php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following