Home >Backend Development >PHP Tutorial >php这样写为什么没效果

php这样写为什么没效果

WBOY
WBOYOriginal
2016-06-06 20:19:281174browse

<code>if ($next_id="") {
} else {
  echo '<button id="Load" next="'.$next_id.'"></button>';
}</code>

$next_id的值是2时可以输出
但是我想在最后一页什么也不输出,而这段代码在最后一页输出
求哪里出错了

回复内容:

<code>if ($next_id="") {
} else {
  echo '<button id="Load" next="'.$next_id.'"></button>';
}</code>

$next_id的值是2时可以输出
但是我想在最后一页什么也不输出,而这段代码在最后一页输出
求哪里出错了

你在之前的页面还能正常输出?

if ( $next_id = "" )

赋值 = 号啊,大哥……

... Sorry , 是逻辑运算符的问题..

<code>if ($next_id="") {</code>

怎么能在if里赋值呢?

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