Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$numbers = array('1','2','3','4'); $number = '1';
有什么方法可以将所有数字与一个数字进行比较,看看其中一些值是否等于 $number?
就在这里:
if(in_array(1, array('1','2','3','4'))) { echo 'It in here'; }else{ echo 'nope its not';}