codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php $_POST_EXAMPLE = array(); $_POST_EXAMPLE['ratings'] = array( 'twix' => 1, 'butterfinger' => 3 ); $ratings = array_unique($_POST_EXAMPLE['ratings']); // Two of the candy bars had the same rating if( count($ratings) !== 3 ) { echo 'ERROR MSG HERE!'; }else { echo 'Success!'; }
Private
[
?
]
Run code
Submit