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

"options"=>array是什么 意义

WBOY
Release: 2016-06-13 11:50:09
Original
1606 people have browsed it

"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 />?>
Copy after login

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template