[ create a new paste ] login | about

Project: baylorrae
Link: http://baylorrae.codepad.org/fpP4eVNq    [ raw code | output | fork ]

BaylorRae - PHP, pasted on Oct 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?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!';
}


Output:
1
ERROR MSG HERE!


Create a new paste based on this one


Comments: