Hello, i have control form, i’m using few fields as label… fields are set in events onLoad e.g.:
{field1}= $var1
{field2}= $var2
{field3}= “textHere”
Well, that works ok for single value text or number…
I want to display a table with about 10 rows and 4 columns, don’t know how to use foreach here
my code
sc_lookup(rs, "SELECT name, class, number, section FROM students_table");
{field4} = "<table><tr><th>Name</th><th>Class</th><th>Number</th><th>Section</th></tr><tr><td>".{rs[0][0]}."</td><td>".{rs[0][1]}."</td><td>".{rs[0][2]}."</td><td>".{rs[0][3]}."</td></tr></table>";
That works okay…
But i want to display all 10 rows without adding them one by one !! something like using foreach or $i++ but couldn’t figure it out
There must be a way to display this array nicely even without table!? just brain stops grrrrrrrrrrrr
anybody tried it?