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
Unexpected T_Variable ?
Hi all,
I dont really know what I am doing!! I know I'm doing something wrong, and I know its on
do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th
Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...
Code: $define_li
http to https
Hi,
Is there any specific method/condition to move an http:// page to https:// ?
Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty
Stuck with preg_replace
Hi,
I'm trying to use preg_replace to remove part of the IP address submitted using a form on
couldn't connect to your database
Hello I am new to php mysql
Actually i have read A tutorial on nettuts
"http://net.tu
PHP Array quick help
I need
$_SESSION{'username'} to be like this:
if $_SESSION['username'] = "gay
How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.
I have a form with several drop down me
Sendmail.php - heading error following check_input
Hi,
I would greatly appreciate some help? I am brand new to PHP and have been searching and e