Home >Backend Development >PHP Tutorial > 关于赋值和判断语句的有关问题

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

WBOY
WBOYOriginal
2016-06-13 12:43:371041browse

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

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


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

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

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