International PHP Conference Munich 2025

Voting

: two plus zero?
(Example: nine)

The Note You're Voting On

ben at kazez dot com
21 years ago
To check whether an array $a is a subset of array $b, do the following:

<?php
if(array_unique($b + $a) === $b)
//...
?>

Actually, PHP ought to have a function that does this for you. But the above example works.

<< Back to user notes page

To Top