|
Posted by Rik Wasmus on 10/31/07 13:09
On Wed, 31 Oct 2007 14:02:21 +0100, dysfunct <DysfunctY2K@gmail.com> wro=
te:
> I just did this:
>
> function array_isearch($num, $array){
> $found =3D array();
> $n =3D 0;
> foreach ($array as $k =3D> $V){
> settype($v,string);
> echo "The ".gettype($v)." ".$v." does NOT equal ";
> echo "the ".gettype($num)." ".$num."<br/>";
> if (strncasecmp($v,$num,6)=3D=3D0){
> $found[$n] =3D $k;
> $n +=3D 1;} }
>
> return $found;
> }
>
> The thing is, I'm getting "The string does NOT equal the string
> [6digit number]." It's not picking up that value from the array...
> hmm......
$V !=3D $v
Please enable display_errors, and set error_reporting to E_ALL | E_STRIC=
T.
And I'm still quite curious what the result of your var_dump was...
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|