开发者

get data from sql and show on specific location

I m using the following query to get data from sql :

$query = mysql_query($sql);

while($row = mysql_fetch_array($q))
  {
  $url = ''.$row['a'].'&nbsp;'.$row['b'].'&nbsp开发者_Go百科;'.$row['c'].'&nbsp;'.$row['d'].'<br>';
  }

now i want to do replace {URL} (that is writen in html file ) with data from sql

$mtheme = str_replace("{URL}",$url,$mtheme);

echo $mtheme;

the problem i that it shows only last row


$url .= ''.$row['a'].'&nbsp;'.$row['b'].'&nbsp;'.$row['c'].'&nbsp;'.$row['d'].'<br>';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜