How to fix the Undefined index error in PHP

WBOY
Release: 2016-07-25 09:05:22
Original
1170 people have browsed it
  1. function _get($str){
  2. $val = !empty($_GET['str']) ? $_GET['str'] : null;
  3. return $val;
  4. }
  5. ?>
Copy the code

Use _get('str') directly instead of $_GET['str'].



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