[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Event date change color using minical

Posted on 2014-01-29
2
Medium Priority
?
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 111

Accepted Solution

by:
Ray Paseur earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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.
Suggested Courses

656 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