Voting

: min(four, one)?
(Example: nine)

The Note You're Voting On

geuis dot teses at gmail dot com
18 years ago
Here's the shortest line of code I could find/create to remove all duplicate entries from an array and then reindex the keys.

<?php

// Fruits, vegetables, and other food:
$var = array('apple','banana','carrot','cat','dog','egg','eggplant','fish');

$var = array_values(array_unique($var));
?>

<< Back to user notes page

To Top