Hi, i have this function which only returns one row from the table. why??
if i use echo() it returns all, return doesn't?? why? how can i get round it?
this doesn't work
any ideas?
thanx
Martin
Computing help and info:
if i use echo() it returns all, return doesn't?? why? how can i get round it?
this doesn't work
Code:
function L1(){
$query = mysql_query("SELECT * FROM wrv3pages WHERE section = 'main'");
while($rq = mysql_fetch_array($query)){
return($rq["title"])."<br>";
}
}
this works:
function L1(){
$query = mysql_query("SELECT * FROM wrv3pages WHERE section = 'main'");
while($rq = mysql_fetch_array($query)){
echo($rq["title"])."<br>";
}
}
any ideas?
thanx
Martin
Computing help and info: