By slamMan on
I am trying to format my table so that the rows have 2 lines of data like below:
1234 John Doe
anything anything anything
here is my $rows[]
$rows[] = array(l(t('View'), "user/$records->nid/edit", array(), $destination) , $records->client_fname, $records->client_lname);
I have been trying to add <br> with no success. I am still having trouble figuring out the syntax. Can someone please help with an example of how to correct this code. Also any suggestions on further reading on how to do this kind of stuff i.e. format tables and sql output would be appreciated. I have read theme_tables but it is very brief and lacking in practical examples. At least as far as I can understand.
Thanks in advance for the help.
Comments
Does this help format the table
Each array element represents one column in the table, the example you show would be a three column table. To do what you want you would combine data something like this.
Which would give you a two column table. You can of course use data instead of constants so the first line of the example above combined with you example might read
Not quite but gave me the jist of it.
Your code was dead on, you just didn't quite get what I meant. However I was able to solve my problem by seeing what you did. Here is my code maybe there is a more elegant way to do it.
This gave me the results I was looking for, and your code made it easier than I anticipated.
Thanks for the help again.
I'm doing something wrong..
This looks like what I need for my table but when I place this code in a Story I get no output?
Am I not doing something simple like a print statement at the end?
Thanks
I'm using the Tables module
I'm using the Tables module now, it does what I require.
http://www.webgeer.com/tables_demo