I m using the following query to get data from sql :
$query = mysql_query($sql);
while($row = mysql_fetch_array($q))
{
$url = ''.$row['a'].' '.$row['b'].' 开发者_Go百科;'.$row['c'].' '.$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'].' '.$row['b'].' '.$row['c'].' '.$row['d'].'<br>';
精彩评论