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 Like 25 Dislike
Previous forums Next forums
Other forums

rookie looking for help coding a CSS form with PHP
I'm trying to figure out how to add PHP code to my xhtml form so that it is a working form embedded

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

Why is my row count 0?
Here's the MySQL query i'm running. It basically pulls data from 2 tables based on some data passed.

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email

Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want

pointer 102 question
I read a book
1
2
3
4
5
6
7
8
9
10
11
12
int main() {

Help on Order Entry Form/System Where is best to begin.
I have a dilema and a very short amount of time at this point and I'm looking for some help on decid

Interpret Order
Hello all,

I'm wondering if I have this:

Code: $switch = array(
'one' =>

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