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
Not reloading page after php form submit
Hello helpful souls out there. You guys have come through for me in the recent past and I'm hoping s
Code working in IE but not FireFox
I created a dynamic navigation list for my website based off of a table in my database. The code is
Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work.
GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.
I have a
problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi
firefox wouldnt stream mp3 files completely from my php page
hi everyone,
I have a php file trying to read and stream mp3 files. It works fine in IE but my pr
question about n
I was looking at some of the things you could do with php and one of the things I have tried is n.<
PHP4 to PHP5 Conversion
Hi Everyone,
I am working on a site that is built up on PHP4 and each page is being started f
Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the
foreach help.
Hello all,
First time I'm attempting to use a foreach statement and was just wondering if my