douqin6785 2018-06-04 14:44
浏览 134
已采纳

isset php函数检查字符串长度

in my website's registration form, the following php code controls user first name field :

if (!isset($value[4])){
    $return = $register_msg['_register_some_msg'];
} 

what does this code do ? does it have anything with checking the string length ? currently it forces the first name of minimum 3 characters, but as i searched seems that strlen() Function checks the length of string which doesn't exists there.

  • 写回答

2条回答 默认 最新

  • dpkk8687 2018-06-04 14:55
    关注

    The isset() method here just verify if $value[4] (your object, or string, or other) exists or not.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?