petar-gutic wrote a comment+100 XP
3mos ago
petar-gutic wrote a comment+100 XP
3mos ago
petar-gutic wrote a comment+100 XP
3mos ago
@Wanti
You can define multiple conditions inside the same function using logical operators like AND, OR, XOR, etc.
$filteredBooks = filter($books, function ($book) {
return $book['releaseYear'] > 1950 && $book['releaseYear'] < 2000;
});
petar-gutic wrote a comment+100 XP
3mos ago