Solved

Event date change color using minical

Posted on 2014-01-29
2
147 Views
Last Modified: 2014-02-20
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?
minical-home.php
0
Comment
Question by:socialbutterfly
2 Comments
 

Author Comment

by:socialbutterfly
ID: 39819802
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>";
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39819902
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:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question