<?php
$array = array("Kyle","Ben","Sue","Phil","Ben","Mary","Sue","Mary","Ben");
$counts = array_count_values($array);
$1 = $counts['Ben'];
$2 = $counts['Phil'];
$3 = $counts['Mary'];
echo $1+$2+$3;
- Output for 5.4.0 - 5.4.30
- Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in /in/24dUT on line 5
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /in/24dUT on line 5
Process exited with code 255.
preferences:
174.61 ms | 1399 KiB | 67 Q