User Login
Latest Technology Articles
- A New Dimension of PCinvent Group Business Management
- Object's assignment, storage & grabage
- C# Mutliple Dimension Syntax
- Small Business System Diagram
- C# Desktop HTTP Post Method to Web
- PHP, Java & C# Documentation Compile
- C# to Open Firefox and go to a URL
- c++ 8 Queens Chessboard Placement in One Dimension
- My Old C++ Pointer Homework
- Simple C# Code to Open and Select File in WinForm
| Characters List with Anchor Link Looping |
|
|
| Saturday, 14 June 2008 | |
|
Being a e-commerce cart programmer, it is very often that we need to generate a list with anchor link for either stores or products. So the user will get a characters navigation bar on the top start from A to Z. Clicking on a character, it will jump to that position in a web page where a list starts with that specific character. But if we do the coding on by one from A to Z for either navigation bar or the list, it will takes too much time and it might not be efficiency for the page loading time. Here I would like to guide you how to do all of these in Looping to save time......
I n this exmple, I use the famous Shopping Cart System "Virtuemart" here. Characters Anchor Navigation Bar First of all, we create the navigation bar from A to Z first.
Please note that inside the foreach looping, we already have the link with # plus the letter done in this part. Stores List In this store list, the counter $i is a parameter that we can set to have a max stores shows in a column. Hence, I used if($i==0) to echo the opening div first. And if there is no result for foreach, the closing div will occur. $mf_name_firstchar here will output the first character like what we did in the first part.
Comments (0)
![]() Write comment
Tags: Technology Programming Anchor List Looping Anchor List Anchor Jump E-commerce Store List Loop PHP Loop Characters Anchor Virtuemart |
|
| Last Updated ( Monday, 16 June 2008 ) |
| < Prev | Next > |
|---|




