473,657 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Warning: in_array() [function.in-array]: Wrong datatype for second argument in

usafshah
104 New Member
Warning: in_array() [function.in-array]: Wrong datatype for second argument in \tickets\functi ons_ticketsui.p hp on line 196




Can Any one tell me what this warning means ?
Dec 16 '06 #1
1 8113
ronverdonk
4,258 Recognized Expert Specialist
The answer is in the standard PHP documentation on arraya see )]bool in_array ( mixed needle, array haystack [, bool strict] )
It means that the data type of the haystack does not confirm to the data type of the needle. Or that the haystack is not an array.

Ronald :cool:
Dec 17 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
6005
by: AJ Z | last post by:
I am using in_array() to search for a value ("other"), in order to validate a form. If I pass $_POST as the array to search PHP says that it is an invalid datatype. It is an array and if I copy it to another variable (i.e. $list = $_POST;) it works fine. The same is also true of implode(). Do you believe this is intended or is it a bug? --
4
3230
by: j-marvin | last post by:
hi- i am adding and and or operators to a search engine i will have hooked up to my personal bookmarks on my website. i wanted to get rid of duplicate page_url when i chain the conditions together like tcl or delphi or sqlite returns: http://j_m_mc.tripod.com 12 http://www.dubaron.com 11
12
2995
by: prashna | last post by:
Hi all, I am new to C and I am working on some simple programs.I am getting the following warning which I am not able to find what it is, please let me know what is causing this warning.Also What happens if I ignore this warning? inttoascii.c:38: warning: control reaches end of non-void function
22
4043
by: pemo | last post by:
ISO C does not allow extra ';' outside of a function int n;; int main(void) { .... } Anyone care to enlighten me as to why ISO C does not allow this, but
9
28823
by: JBuckner | last post by:
My macro uses the Send Object (VBA Item.Send) function to email a spreadsheet to an Outlook contact list. I want the function to be completely automatic but Outlook displays a security warning message (...another program is attempting to automatically email...) that requires user intervention before the macro will finish execution. Can anyone advise me on how to disable the Outlook warning? I tried the Warnings Off function but realized it...
27
3111
by: Terry | last post by:
I am getting the following warning for the below function. I understand what it means but how do I handle a null reference? Then how do I pass the resulting value? Regards Warning 1 Function 'Dec2hms' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.
6
2160
by: geevaa | last post by:
Hi Group, The page 167 of book Learning PHP5 by David Sklar says that setcookie() and session_start() must be added before any output. I tried to use that functions at last line but no warning!. The warning which i got 1 month back is not issued now. ------------------------------------------------------------------ The following is my PHP program <?php function Intelli()
2
2059
by: geevaa | last post by:
Hi Group, The page 167 of book Learning PHP5 by David Sklar says that setcookie() and session_start() must be added before any output. I tried to use that functions at last line but no warning!. The warning which i got 1 month back is not issued now. ------------------------------------------------------------------ The following is my PHP program <?php function Intelli()
3
1407
by: GarryJones | last post by:
I want to add an value to an array if it is not already there. There are four values. Something is misfiring as it as the value to the array even if it is already there. The values are $ml_ept, $scfmlk1d, $scfmlk2d and $scfmlk3d
28
2272
by: Dave Stafford | last post by:
I have a macro that I use across the board for freeing ram. I'd like to clean up my code so I don't get these warnings. #define sfree(x) _internal_sfree((void **)&x) #define _internal_sfree(x) ({ if(x && *x) { free(*x); *x=NULL; } }) void main() { char *x = (char *) malloc(10); int *y = (int *) malloc(10);
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.