hi everyone....
i have a script i made that chooses a random name from a database
i need to output many names on the page the code is used on, one name for each comment shown on screen.....i tried a few things but the code below is resulting 10 names per message instead of 1 (the 10 is set as my limit in the code made to select a random name)
heres the code in the view (i code with codeigniter)
Code blocks are created by indenting at least 4 spaces
... and can span multiple lines
<?php foreach($comments->result() as $com)
{
foreach($whatsmyname->result() as $whatsmy)
{
echo '<p>'.$whatsmy->name.' commented on '.$com->bid_time.'</p><p>'.$com->bid_desc.'</p>';?></br>
<?php }}?>
what i need is to maybe find a way of limiting the names to the ammount of comments posted? im not sure how i would do that?
im open to any ideas...thanks