This is really the first time I've tried writing any actual functions, so bare with me. 😃
I've written a simple loup that grabs some things and outputs them to the page - it works very well.
Now, I'm trying to call up another function inside of the loop to display the number of comments something has (it's for a blog I'm playing around with).
I call it up like this (I'm not posting the entire code - I don't think it's necessary...?):
$s .= "<h1>$rs[title]</h1>\n";
$s .= "$rs[text]\n\n";
$s .= getCommNumber($rs['id'], $rs['show'], $rs['template'], $rs['ptime'], $rs['usernick']);
Now, what's happening is that "getCommNumber" is returning a result for only one of the entires - not each individual one. The query I'm using for this fucntion is correct - I've tested it outside of the functions altogether and it works just right.
So, the question is, can I call another function inside of another functions loop and have it return the correct data?
Otherwise, is there another approach I should take to solving this?
Thanks for the help...v