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

problem in pagination when processing with selectbox form
Hi,

I have a search form, with select boxes, if am selecting the value from the form, it work

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

Ten Operator Syntax
Hi Guys,

I can't figure out why i am getting a parse error with this basic ten op code:

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords al

single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be

need help to creat database
Hello Team, please guys i am stuck from three days with paypal issue for IPN but no luck yet now i w

Linkage between two scripts
Okay say I have this for a link in a script:

Code: <li><a href="#&q

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

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