Look at the following code :
<?php
function getmangainfo($teamname)
{
$rValue = "";
$lValue = "";
$query = ("SELECT pic, mn_title FROM table Where mn_team LIKE '%" . $teamname . "%' Limit 0,4 ");
$row_data = mysql_query($query);
while ($row_data = mysql_fetch_array($row_data)) {
$rValue = $row['pic'];
$lValue = $row['mn_title'];
return "<a class='linksrepeated' href='" . $ABSPATH . "/" . $lValue . "/'> <img src='" . $rValue . "'/></a>";
}
}
this function is not returning anything! I am thinking it is because that the return statement is inside the while loop. I tried many things hoping it will return the 4 results but nothing happened. the SQL query works 100%. the problem is with my function. please let me know what is wrong and how to fix it.