On Mon, Apr 02, 2001 at 12:41:07AM -0700, V e r b a l wrote:
> I'm daft. I don't understand the PHP Manual.
>
> I have two arrays:
> Open[0] contains 1 2 3 4 5
> Closed[0] contains 1 2
So the arrays contain one string each? array_diff() won't work then.
Try this:
$a = array(1, 2, 3, 4, 5);
$b = array(1, 2);
$test = array_diff($a, $b);
$lines = count($test);
echo $lines;
var_dump($test);
The output should be:
3array(3) {
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
}
Stig
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]