Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3213508
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:57:10+00:00 2026-05-17T14:57:10+00:00

How Not to Display a separator or a border after last data of the

  • 0

How Not to Display a separator or a border after last data of the list?

I have a list of data which is coded in the form of <ul> and <li>

and it is formatted in the way that after every record a border or separator needs to be displayed but after last record this border should not be displayed.

I am aware of the fact that it has to be coded with the help of for loop, but I cannot catch the logic for that.

I am working in PHP and the data is being fetched from Mysql DB

below is the format of data to be displayed and in it, the last <li> is for displaying separator

UPDATED

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) 
{
    <ul>
       <li class="col1"><?php echo $order->products[$i]['qty']; ?></li>
                        <li class="col2"><?php echo $product_image; ?></li>
                        <li class="col3"><?php echo $product_name; ?></li>
                        <li class="col4"><?php echo $currencies->display_price($finalprice, $order->products[$i]['tax'], $order->products[$i]['qty']); ?></li>

                        <li class="dotted-border"></li>
    </ul>  
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:57:10+00:00Added an answer on May 17, 2026 at 2:57 pm

    Unless I misunderstood it:

    if($i<$n-1)
    echo"<li class="dotted-border"></li>";

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL Server 2000 database that will not display the column list
My form views fine in IE7 and IE8 but FireFox does not display the
hi guys I wanted to know, is there a way to not display my
I'm sending user data via jQuery to TCPDF, but it does not display any
I have a ListActivity in which I am trying to display an ImageView under
I have this: <script type=text/javascript> jQuery(document).ready(function(){ jQuery('#menu-main-menu li a').after('<p class=separator>/</p>'); jQuery(.textwidget a[href^='http://']).attr(target,_blank); }); </script>
Firefox requires xhtml extension for mathml but IE will not display pages with xhtml
My code seems to run but it does not display the result any result
The answer should be returned but it does not display for some reason. I
Sometimes in a floated div. IE6 does not display tags, however it does space

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.