Jump to content

[SOLVED] PHP ECHO HELP


nathan1

Recommended Posts

Hey PHP Legends,

 

I have a problem with echoing some stuff in php...(using smarty) - ive got some events im trying to echo out, trying to get a 3 x 3 events listing eg:

 

EVENT ONE  |  EVENT TWO  |  EVENT THREE

 

EVENT FOUR  |  EVENT FIVE  |  EVENT SIX

 

EVENT SEVEN  |  EVENT EIGHT  |  EVENT NINE

 

My Codes is;

 

 

 

  <table cellpadding='0' cellspacing='0' class='portal_table' align='left'>

 

  <tr><td bgcolor="#ff9933" height="40"><div style="padding-left: 5px; font-weight: bold;">EVENTS</div></td></tr>

 

  <tr>

 

  <td class='portal_box'>

{section name=event_loop loop=$events max=3}

 

{cycle name="startrow" values="

<table cellpadding='0' cellspacing='0' align='center'><tr bgcolor='99ccff'>,,,,"}

 

        <td class='portal_member'><div align="left">

<a href="event.php?event_id={$events[event_loop]->event_info.event_id}">

Title: {$events[event_loop]->event_info.event_title}<br />Description: {$events[event_loop]->event_info.event_desc}<br />

<img src='./images/nophoto.gif' width="177" height="135" border='0'>

</a></div><br /><img src="images/table_final.gif" align="baseline">

</td>

 

    {* END ROW *}

 

        {if $smarty.section.event_loop.last == true}

 

</tr></table>

 

        {else}

 

          {cycle name="endrow" values=",,,,</tr></table>"}

 

        {/if}

 

      {/section}

 

 

 

 

I Know how to echo the events but don't know how to get the events to goto a next row after 3 events...i know its in smarty so if you could please tell me how to do it in php if you dont know smarty- would be appreciated.

 

Thanks heaps

Link to comment
https://forums.phpfreaks.com/topic/113828-solved-php-echo-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.