Categories > TinyButStrong general >

2 array's block values in one row

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: netbrain
Date: 2005-01-23
Time: 18:16

2 array's block values in one row

Hi, i'm stuck:
My PHP
include_once('tbs_class.php') ;
...
$menyy[0] = array('pealkiri'=>'Menu', 'nimetus'=>'Sviit', 'alam'=>'tuba');
$menyy[1] = array('pealkiri'=>'Menu', 'nimetus'=>'Sviit', 'alam'=>'2 tuba');
$menyy[2] = array('pealkiri'=>'Menu', 'nimetus'=>'Sviit', 'alam'=>'3 tuba');
$menyy[3] = array('pealkiri'=>'Menu', 'nimetus'=>'Sviit', 'alam'=>'4 tuba');
$menyy[4] = array('pealkiri'=>'Menu', 'nimetus'=>'Sviit', 'alam'=>'5 tuba');
$menyy[5] = array('pealkiri'=>'Menu', 'nimetus'=>'Urgas', 'alam'=>'koiku');
$menyy[6] = array('pealkiri'=>'Menu', 'nimetus'=>'Urgas', 'alam'=>'2 koikut');
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('menyy.htm');
$TBS->MergeBlock('blk_menu',$menyy);
$TBS->Show() ;
I create table that looks like this:
<table>
  <tr>
      <td>Menu</td>
  </tr>
  <tr>
      <td>
          <div>Sviit</div>
          <div><img src="1x3empty.gif" border="0">tuba</div>
          <div><img src="1x3empty.gif" border="0">2 tuba</div>
          <div><img src="1x3empty.gif" border="0">3 tuba</div>
          <div><img src="1x3empty.gif" border="0">4 tuba</div>
          <div><img src="1x3empty.gif" border="0">5 tuba</div>
      </td>
  </tr>
  <tr>
      <td>
          <div>Urgas</div>
          <div><img src="1x3empty.gif" border="0">koiku</div>
          <div><img src="1x3empty.gif" border="0">2 koikut</div>
      </td>
  </tr>
</table>
So far my HTML looks like this and it places every value to different row:
<table>
  <tr>
      <td>[blk_menu.pealkiri;block=tr;headergrp=pealkiri]</td>
  </tr>
  <tr>
      <td>[blk_menu.nimetus;block=tr;headergrp=nimetus;htmlconv=no]</td>
  </tr>
  <tr>
      <td>
          [blk_menu.alam;block=tr]
      </td>
  </tr>
  <tr>
      <td>
          [blk_menu;block=tr;footergrp=nimetus;nodata]
      </td>
  </tr>
  <tr>
      <td>
          [blk_menu;block=tr;footergrp=pealkiri;nodata]
      </td>
  </tr>
</table>
By: netbrain
Date: 2005-01-23
Time: 20:05

Re: 2 array's block values in one row

Sorry about my last post, got the right HTML code:
<table border="1">
  <tr>
      <td><font color="blue"><b>[blk_men.pealkiri;block=tr;headergrp=pealkiri]</b></font></td>
  </tr>
<algus>
  <tr>
      <td>
<strong>[blk_men.nimetus;block=algus;headergrp=nimetus]</strong>
</algus>
        [blk_men;block=begin]
        <div align="right">[blk_men.alam]</div>
        [blk_men;block=end]
<lopp>
[blk_men;block=lopp;footergrp=nimetus;nodata]
      </td>
  </tr>
</lopp>
  <tr>
      <td>
          [blk_men;block=tr;footergrp=pealkiri;nodata]
      </td>
  </tr>
</table>