echo 'card1 is ',printCard($card1),'<br/>';
echo 'card2 is ',printCard($card2),'<br/>';
$str = 'card1 equit card2';
if($result == 1) $str = 'card1 is larger than card2';
elseif($result == -1) $str = 'card1 is smaller than card2';
echo $str;
function printCard($card)
{
$str = '(';
foreach($card as $v){
$str .= $v[0].$v[1].',';
}
return trim($str,',').')';
}