array是什么 意思代码如下"/> array是什么 意思代码如下">

Home >Backend Development >PHP Tutorial >"options"=>array是什么 意义

"options"=>array是什么 意义

WBOY
WBOYOriginal
2016-06-13 11:50:091610browse

"options"=>array是什么 意思
代码如下

<br /><?php<br />$var=300;<br /><br />$int_options = array(<br />"options"=>array<br /> (<br /> "min_range"=>0,<br /> "max_range"=>256<br /> )<br />);<br /><br />if(!filter_var($var, FILTER_VALIDATE_INT, $int_options))<br /> {<br /> echo("Integer is not valid");<br /> }<br />else<br /> {<br /> echo("Integer is valid");<br /> }<br />?>

------解决方案--------------------
$int_options = array(<br />	"options"=>array<br />	(<br />		"min_range"=>0,<br />		"max_range"=>256<br />		)<br />	);

php数组的定义
=> 是数组成员访问符号 键名为options,值为array("min_range"=>0,"max_range"=>256) ...

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