<?php
$val1 = echo "".$response['players'].""; // it will output 1
$val2 = echo "".$response['maxplayers'].""; // it will output 3
$res = ($val1 / $val2) * 100;
echo $res; // it will output 33,33333
?
しかし、このエラーが発生します:
Parse error: syntax error, unexpected 'echo' (T_ECHO)
in /home/mcthebli/public_html/test.php on line 36
誰かが何が間違っているのか知っていますか? :/