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> ?>
Did you know?Explore Trending and Topic pages for more stories like this.
<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 Like 25 Dislike
Previous forums Next forums
Other forums

Echoing a Variable from a Object
How do I get a variable from the new User Class to echo out in this clasS?

class MyApp
{

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

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

News script
Hi ...

I am not sure if this is the rite place to post this but if its not sorry

i am

function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the

xml element exists
Code: [Select]<?xml version="1.0"?>
<Addresses>
<

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash