php中next()函数怎么用
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/wwwroot/www.xrvps.com/wp-content/plugins/article-with-pictures/includes/class-article-with-pictures-plugin.php on line 755
Warning: file_get_contents(https://pixabay.com/get/g43596bf692d1c97fec8c31272180fc458e36814f9692bc1ab251bfcb8c7a621feb2f35e41503703ff914216197616b74a2aadd1f0385e1fba3242d4f2f19210a_640.png): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/wwwroot/www.xrvps.com/wp-content/plugins/article-with-pictures/includes/class-article-with-pictures-plugin.php on line 755
next()函数作用:
php中next()函数的作用是将数组中的内部指针向前移动一位。
next()函数语法:
next(array)
参数:
array:规定要使用的数组。
next()函数使用方法:
例:输出数组中的当前元素和下一个元素的值<?php
$people = array("Bill", "Steve", "Mark", "David");
echo current($people) . "<br>";
echo next($people);
?>
The End
发布于:2022-12-19,除非注明,否则均为
原创文章,转载请注明出处。
发表评论