• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

Event date change color using minical

I posted a question about the php and got an answer that seemed to work. But upon further review, it only works for the current month. It gives this error when I click on to another month.

Warning in_array()[; Wrong datatype for second argument in ... on line 181

Can anyone help?
1 Solution
socialbutterflyAuthor Commented:
It's in this section..

echo $adj."<td ";

if (in_array($i,$activedays))

{ echo 'class=today-event ';

if (($i == date('d')) && ($m ==date('m'))){

echo "class=today";


echo " width='25px'>$thedate</td>";
Ray PaseurCommented:
Good news!  All of the PHP functions are documented in writing on the www.php.net web site.  In the instant case, please see in_array().  According to the documentation, it expects an array for the second argument.  You can test to see if the second argument is an array before you call in_array() and make a programmatic decision whether your script should call the function or choose some other course of action.

If you're new to PHP and want to get a foundation in how the language works, this article may be helpful:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now