![]() |
Columnizing
I've NO idea what I am doing wrong here.
PHP Code:
PHP Code:
NOTE: I cut out the template name and query because they aren't really relevant they both work perfectly and this is a snippet of the overal code the rest of it isn't relevant to this part (or even executed yet) hence why I haven't posted it. |
There is a closing curly brace (}) missing from your while() statement. Also you don't need the single quotes around the 3 in [minicode]$columncount = '3';[/minicode]. Run
PHP Code:
Maybe check that you are getting results from the database first. |
1 Attachment(s)
The query is working fine, its returning all 4 records from the database with errors and the counter is working fine as I've put $counter in the template and its clearly stating 1-3 then resets to 1 without adding the </tr><tr> on 3.
See attached picture. Its returning the names, the descriptions and the counter. |
Well if you are using templates you can't echo or print anything but what you can do is something like this.
PHP Code:
|
Oh wow, that works. Thanks!
Question: what does the . in .= do? |
Concatenate :)
Google it. |
Always check the HTML source of the output when you're using PHP and things do go to plan. Sometimes the browser hides incorrectly placed code so you don't always see the exact output. It probably would have shown you your error. ;)
|
Quote:
|
All times are GMT. The time now is 06:45 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|