Quote:
|
Originally Posted by xAndrewx
I use this method, I'm sure it works too.
PHP Code:
function onCreated()
{
temp.test = {"hey", "test"};
if (contains(temp.test, "test")) //If 'test' is in temp.test, it'll echo 'Found' to the NC users
{
echo("Found");
}
else
{
echo("Not Found");
}
}
|
Same thing as the in operator? if("test" in temp.test) {?
He is trying to compare substrings, not check if a value is in an array, I believe.