Home > php教程 > php手册 > list与push的区别

list与push的区别

WBOY
Release: 2016-06-13 10:03:18
Original
1566 people have browsed it

list与push的区别是什么?

//函数list
            while(list($id,$username,$password,$add_date,$mdn,$mobile,$channel,$last_date,$area,$nickname) = mysql_fetch_array($rs)){
                    $article[$i]['id'] = $id;
                    $article[$i]['add_date'] = $add_date;
                        $article[$i]['mdn'] = $mdn;
                    $article[$i]['last_date'] = $last_date;
                        $article[$i]['area_id'] = $area;
                        $article[$i]['nickname'] = $nickname;
                    $i ++;
               }

//函数array_push
            while($row  = mysql_fetch_array($rs)){
                    $article = array_push($row);
               }

这两个函数有什么是:

list不创建数组,直接赋值,而push用于追加数组项

 

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template