Warning:in_array () expects parameter 2 to BES array, string given in D:\wamp\www\suiji.php on line 26

Source: Internet
Author: User

Same PHP version problem: In_array () function The second argument should be an array

But Lnmp under, PHP5.3 not error, Wamp under PHP5.5 reported the following error:

echo "<br>for in_array:"; $arrstr = "Weibhd1", if (In_array ("Weibhd1", $arrstr)) {    echo "ok!";} else{   echo "no!";}

{main} ()

td>

(!)  warning:in_array () expects parameter 2 to is array, string given in D:\wamp\www\suiji.php on line 

call Stack

#

time

Memory

Function

location

1

0.0010

147376

: \suiji.php : 0

2

0.0060

170912

in_array  ()

. \suiji.php :

array!

Warning:in_array () expects parameter 2 to BES array, string given in D:\wamp\www\suiji.php on line 26

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.