$Lecturer = $LecturerGiven . $LecturerSn 

解决方案 »

  1.   

    $Lecturer   =   $LecturerGiven + $LecturerSn  的结果为布尔值。
      

  2.   

    也就是说PHP字符串相加要用 . 
    呵呵我当成Javascript了.不过$LecturerGiven   +   $LecturerSn的结果为什么是0,什么时候才是true?
      

  3.   

    (boolean)($LecturerGiven+$LecturerSn)
    (bool)($LecturerGiven+$LecturerSn)
      

  4.   

    加法运算时PHP会进行自动类型转换,如果字符串不能转换为整数或者浮点数,就自动转换为整数0.