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

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

CHECK A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect a

radio button reamains checked
Hello i'm trying to keep the state off my radio buttons so it shows which ones where clicked after t

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

Simple AND question
Hello,

I've got following code:

Code: if(strpos($row[13],"http://")

check if string contain only a-z/A-Z
Is where any way to check if string contains only a-z/A-Z, without writing an array with all possibl

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP th

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