Database Articles
  Home arrow Database Articles arrow Multicolumn Output from a Database with PHP
Try It Free
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE ARTICLES

Multicolumn Output from a Database with PHP
By: Matt Wade
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2002-07-17

    Table of Contents:
  • Multicolumn Output from a Database with PHP
  • Horizontal Display
  • Vertical Display
  • Something to think about

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
    Try It Free
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Multicolumn Output from a Database with PHP


    (Page 1 of 4 )

    Putting your data into multiple columns with PHP is a snap. This tutorial will show you how it is done.

    OK, so you know how to get your data out of a database and display it. But, it looks rather dull in a single column down the screen doesn't it? Today you will learn how to put that data into multiple columns. We will do this two different ways. The first we will display the data moving horizontally across the screen. Like so:

    1 2
    3 4
    5 6
    7 8

    The second method we will display the data going vertically, like so:

    1 5
    2 6
    3 7
    4 8

    I am going to make a couple assumptions during this tutorial. First, that you already understand how to query your data out of the database. Second, that you understand the basics of PHP.

    OK, so on to the first method!

    More Database Articles Articles
    More By Matt Wade


       · How can I accomplish this without useing tables with php and css?ThanksSean...
       · Hi, vey nice script just what I was lookin for.Ive been trying to create link...
       · <? include("open_session.php"); if...
       · Great piece of code, I'm a newbie. How can I change the code to create a border...
       · Great piece of code, I'm a newbie. How can I change the code to create a border...
       · [php]<?php$q = mysql_query("SELECT `stuff` FROM `stuff` ORDER BY...
       · 
     

    DATABASE ARTICLES ARTICLES

    - More on Query Optimization for Oracle Databa...
    - Query Optimization in Oracle
    - Clusters and Other Data Structures for Oracle
    - Using Indexes with an Oracle Database
    - The Basics of Data Structures in Oracle
    - Oracle Data Structures
    - Best Practices for PL/SQL Variables
    - What`s Code Without Variables?
    - Clauses, Sorting, and SQL Queries
    - The From Clause and SQL Queries
    - Query Primer
    - Full Text Searches and Strings
    - Searching with Strings
    - Pattern Matching with Strings
    - Working with Cases of Strings





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway