关于赋值和判断语句的有关问题

WBOY
Release: 2016-06-13 12:43:37
Original
1006 people have browsed it

关于赋值和判断语句的问题

<br />
 if ($userName=="system"){<br />
    $userName_msg="自动";<br />
 }else{<br />
   $userName_msg="";<br />
 }<br />
Copy after login


<br />
 $userName_msg="";<br />
 if($userName=="system"){<br />
    $userName_msg="自动";<br />
 }<br />
Copy after login

我想要给变量$userName_msg 赋值,上边两种写法有什么差别吗?

Related labels:
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