关于foreach输出有关问题

WBOY
Release: 2016-06-13 12:39:42
Original
1043 people have browsed it

关于foreach输出问题
$sql1="select * from y_cate order by asc";
$result1=mysql_fetch_array(mysql_query($sql1));
var_dump($result1);
foreach($result1 as $ke=>$a){
    echo $a."
";
}
?>
我想用foreach 来循环输出cate表的所有数据,为什么只输出一条数据的?求解答

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!