Solved

Event date change color using minical

Posted on 2014-01-29
2
144 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
Comment Utility
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 108

Accepted Solution

by:
Ray Paseur earned 500 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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…
The viewer will learn how to dynamically set the form action using jQuery.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now