Welcome Guest, Not a member yet? Register   Sign In
Views and PHP Code
#2

[eluser]felyx[/eluser]
Well here is how I create table with php in a view:

Code:
<table border="0" cellspacing="0" cellpadding="0">
<tr>
  <td>t1</td>
  <td>t2</td>
</tr>

&lt;?php foreach($itemarray as $item): ?&gt;

<tr>
  <td>&lt;?php echo $item['t1']; ?&gt;</td>
  <td>&lt;?php echo $item['t2']; ?&gt;</td>
</tr>

&lt;?php endforeach; ?&gt;

</table>

It seems fine to me but maybe someone can show you a better approach. However I think you should not complicate it more if you can settle with this solution, its just a simple easy to understand code in a view even a designer can handle it I think.


Messages In This Thread
Views and PHP Code - by El Forum - 02-01-2009, 12:25 PM
Views and PHP Code - by El Forum - 02-01-2009, 01:03 PM
Views and PHP Code - by El Forum - 02-01-2009, 01:54 PM
Views and PHP Code - by El Forum - 02-01-2009, 01:57 PM
Views and PHP Code - by El Forum - 02-01-2009, 02:11 PM
Views and PHP Code - by El Forum - 02-01-2009, 07:36 PM
Views and PHP Code - by El Forum - 02-01-2009, 07:48 PM
Views and PHP Code - by El Forum - 02-01-2009, 08:49 PM
Views and PHP Code - by El Forum - 02-01-2009, 09:00 PM
Views and PHP Code - by El Forum - 02-01-2009, 10:15 PM
Views and PHP Code - by El Forum - 02-01-2009, 10:32 PM
Views and PHP Code - by El Forum - 02-01-2009, 11:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB