Home  >  Article  >  Backend Development  >  php传参的有关问题

php传参的有关问题

WBOY
WBOYOriginal
2016-06-13 13:33:05920browse

php传参的问题
我想在getStaffListByID函数的循环中调用getStaffListByLID函数,但是到getStaffListByLID里貌似lid的值没有传过来,请问怎么办?

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
function getStaffListByID($con){
        global $idn,$id,$pic,$name;
        $sel = "select id,pic,name from student;";
        $ret = pg_Exec($con,$sel);
        $idn = pg_NumRows($ret);
        for ( $i=0; $i


------解决方案--------------------
我不信
你在 getStaffListByLID函数里加一句 var_dump($lid);
Statement:
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