php数据库
<code> //PHP模糊查询技术 $sql="select * from preinfo where prename like '%{$keywords}%'"; $res=mysql_query($sql); $prename=array(); //用于保存查询到的药方 if(!empty($keywords)){ while($row=mysql_fetch_assoc($res)){ $prename[]=$row; } } //print_r($prename); if($keywords){ echo'<h3>查询关键字<font color="red">'.$keywords.'</font>的结果为:</h3>'; } if($prename) { echo'<table align="center" width="500" border="1" cellpadding="5"> '; echo'<tr><th>药方名</th><th>所属目次</th><th>操作</th></tr>'; //循环输出查询结果 foreach($prename as $key=>$value){ $murl=$value['content']; echo'<tr>'; echo'<td>'.$value['prename'].'</td>'; echo'<td>'.$value['caname'].'</td>'; echo '<td>' <a href="<?php echo $murl; ?>> 查看</a> '</td>'; echo'</tr>'; } echo'</table>'; }点击查看,会跳转到相应页面,请问代码改如何修改? echo '<td>' <a href="<?php echo $murl; ?>> 查看</a> '</td>'; 这句代码显示错误,请问该如何解决?求大神们帮忙解答!!!!</code>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号