here is the code
<?php error_reporting(-1);// чекает ошибки $v=$randomc==$randomx ; $randomx=mt_rand(1,6); // от одного до шести $randomc=mt_rand(1,6); //от одного до шести if (($randomx>$randomc)){ echo "победил игрок 1 $randomc , а игрок 2 проиграл $randomx ";} else (($randomc<$randomx));{ echo "победил игрок 2 $randomx , а игрок 1 проиграл $randomc ";} elseif ((v));{ echo "ничья, у вас одинаковые цифры $randomx у 1 и $randomc у воторого";} exit(); ?> here's a link to ideone.com
I'm new here and I can not understand what the problem is, why does it give an error in the elseif line?
if (CONDITION) { BODY; } elseif (ANOTHER_CONDITION) { ANOTHER_BODY; } else { ELSE_BODY; }if (CONDITION) { BODY; } elseif (ANOTHER_CONDITION) { ANOTHER_BODY; } else { ELSE_BODY; }if (CONDITION) { BODY; } elseif (ANOTHER_CONDITION) { ANOTHER_BODY; } else { ELSE_BODY; }and now compare with your code. By the way, ideone showed you where the error is. And more:$v = $randomc == $randomx;Don't you think something is wrong here? - BOPOH