Get Paid to Participate - up to $1 per post!     Twitter     Facebook     Google+
Hosting Discussion
 

forgot password?



Reply


Old
  Post #1 (permalink)   05-20-2009, 12:17 AM
HD Guru
 
siforek's Avatar
 
Join Date: Mar 2009
Location: Salt Lake City, UT
Posts: 663

Status: siforek is offline
Ok, so I'm pulling server plans and their details from the database. I could easily use a foreach and construct a table similar to: http://softlayer.com/servers_dedicated_all.html

It would look something like:
PHP Code:
<table>
<
tr>
<
td>name</td>
<
td>price</td>
</
tr>
{foreach 
key=num item=server from=$dedicated}
<
tr>
<
td>{$server.name}</td>
<
td>{$server.price}</td>
</
tr>
{/foreach}
</
table
But what if I want a table similar to: http://www.10tb.com/dedicated-hosting/ ?? I could use a foreach for every single row of the table like this:
PHP Code:
<table>
<
tr>
<
td>name</td>
{foreach 
key=num item=server from=$dedicated}
<
td>{$server.name}</td>
{/foreach}
</
tr>
<
tr>
<
td>price</td>
{foreach 
key=num item=server from=$dedicated}
<
td>{$server.price}</td>
{/foreach}
</
tr
That would work, but I'm looking for an alternate solution that if possible, uses less code. Yes, I'm using smarty. This is within WHMCS and it is a custom page. Any suggestions would be great.
__________________
| | Fiber Elephant | | Virtuozzo & Reseller Hosting
█ | Never oversold, always managed & on the SoftLayer network!
█ | Call us toll free 24/7! | 1-888-92-FIBER
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: