Categories > TinyButStrong general >

emplty array with serial display

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: tomyum
Date: 2008-05-29
Time: 17:46

emplty array with serial display

Hi,

My case , I store result in array, if there is no data return, the php will set the result array to empty ($result = array();)
The following's my html template --> the array with data displayed fine but the one empty displayed only <table></table> ; no content between table tag?? what's wrong with my php part or html part?

<table cellpadding="3" cellspacing="3">
                    <tr> 
                    <td align="center"><a href="?type=subcategory&sc=[myvar2_1.subcat_id;block=td]"><img src="/[myvar2_1.subcat_image]" /><br/>[myvar2_1.subcat_name]</a></td>
                    <td align="center"><a href="?type=subcategory&sc=[myvar2_2.subcat_id;block=td]"><img src="/[myvar2_2.subcat_image]" /><br/>[myvar2_2.subcat_name]</a></td>
                    <td align="center"><a href="?type=subcategory&sc=[myvar2_3.subcat_id;block=td]"><img src="/[myvar2_3.subcat_image]" /><br/>[myvar2_3.subcat_name]</a>[myvar2;block=tr;serial]</td>
                    </tr>
                        <tr> 
                    <td>There is no sub category available here</td>
                    <td>[myvar2_0;block=td]</td>
                    <td>[myvar2;block=tr;serial]</td>
                    </tr>
                  </table>
By: tomyum
Date: 2008-05-31
Time: 01:48

Re: emplty array with serial display

Hi all,

Fixed.

Used --> 'nodata' instead of Block_) (zero index)