Quote:
Originally Posted by Opserty
[php]
Does that work? (You should really layout your code better too  )
|
you absolute star, worked great.
Thanks, I'll be comparing the code now to see where I went wrong.


I've been trying to put all the code above into a function call so that I can set different searches but use the same templates etc but have run into one small problem (again)
The code originally ran and put the results into a table built up from the templates and displayed the code with the style from my site and stored it in $questlist which I displayed in my main template. Worked great.
but now that I have put the code into function fetch_mainquestlist() which returns the results in $questlist it doesn't have any of the formatting from my vbulletin style, it's just a flat table with no style to it...
I believe it is the quest_header template which calls in things like: cellpadding="$stylevar[cellpadding]" so why doesn't my function include these yet the rest of the page does?
do i have to do something to
return $questlist; at the end of my function, or something to the statement in my code that calls it:
$questlist = fetch_questlist();
any help is really appreciated.
(i'm pretty new to this as you've probably guessed)