Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-02-22, 09:31 PM
Junior Member
 
Join Date: Feb 2007
Posts: 2
balka n is on a distinguished road
Default Columns Ordering !

hi
i need code for orders colums like picture:

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2007-02-25, 06:27 PM
Member
 
Join Date: Jun 2006
Posts: 55
flann is on a distinguished road
Default

do you know how to do it in html?
__________________
flann
Free Mortgage Calculator | Debt Free
Reply With Quote
  #3 (permalink)  
Old 2007-02-26, 10:52 AM
Junior Member
 
Join Date: Feb 2007
Posts: 2
balka n is on a distinguished road
Default

yes i know how can i do it to HTML, but i need php code for looping from columns, if i use sample code to get results from datebase i get coluns right down like:
1
2
3
4
5

i need this:

1 2
3 4
Reply With Quote
  #4 (permalink)  
Old 2007-03-31, 09:54 PM
Senior Member
 
Join Date: Jul 2006
Location: Prague, Czech Republic
Posts: 193
vladimir_cz is on a distinguished road
Send a message via ICQ to vladimir_cz Send a message via MSN to vladimir_cz Send a message via Yahoo to vladimir_cz Send a message via Skype™ to vladimir_cz
Default

something like this:

PHP Code:
$needToStartRow true;
$numColumn 2;
$colCount 0;
foreach (
$data as $id=>$d) {
$colCount++;
if (
$colCount == $numColumn) {
  
$colCount 0;
  echo 
"</tr>";
  
$needToStartRow true;
}

if (
$needToStartRow) {
  echo 
"<tr>";
  
$needToStartRow false;
}
 
// put your box output here like:
 
echo "<td>blablabla</td>";
}

// and last step - close if need last <tr>
if ($colCount == $numColumn) {
  echo 
"</tr>";

__________________
Thank you. Vladimir, Czech Republic.
http://www.smartwebco.com/
I'm looking for job.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:28 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.