Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php for循环中的错误?_Php_For Loop - Fatal编程技术网

Php for循环中的错误?

Php for循环中的错误?,php,for-loop,Php,For Loop,我刚刚开始PHP编程,我的for循环中有一个错误。当我删掉它时,代码运行良好 您所写的,for($ip\u and\u hits:$ips){是类似Java的语法 在PHP中,需要使用循环: 你写的,for($ip_和_hits:$ips){是类似Java的语法 在PHP中,需要使用循环: 您的for循环使用错误。语法错误 使用以下第行代码: foreach ($ip_and_hits as $ips) { 您的for循环使用错误。语法错误 使用以下第行代码: foreach ($ip_an

我刚刚开始PHP编程,我的
for
循环中有一个错误。当我删掉它时,代码运行良好


您所写的,
for($ip\u and\u hits:$ips){
是类似Java的语法

在PHP中,需要使用循环:

你写的,
for($ip_和_hits:$ips){
是类似Java的语法

在PHP中,需要使用循环:


您的for循环使用错误。语法错误

使用以下第行代码:

foreach ($ip_and_hits as $ips) {

您的for循环使用错误。语法错误

使用以下第行代码:

foreach ($ip_and_hits as $ips) {

不要滥用我们的质量过滤器。点击和访问了解我们对此处帖子的期望。不要滥用我们的质量过滤器。点击和访问了解我们对此处帖子的期望。给出其他答案后,此答案会增加什么?给出其他答案后,此答案会增加什么?