我正在建立一个评分系统,我想要" +"和" /"
像这样:例如:c71st =" 89" c72nd =" 90" c73rd =" 89" c74th =" 70"
<?php echo $userinfo['c71st'] ?> + <?php echo $userinfo['c71st'] ?> + <?php
echo $userinfo['c71st'] ?> + <?php echo $userinfo['c71st'] ?> /2
我该如何添加和划分? 当我输入+它只显示+登录php形式或html
这与其他问题不同
答案 0 :(得分:0)
只需在php上添加并分割它们。不是在html或javascript中
Addons.objects.create(**tracks_data)
答案 1 :(得分:0)
首先你必须创建$ userinfo数组
<?php
$userinfo = array("c71st"=> 89, "c72nd"=> 90, "c73rd"=> 89, "c74th"=> 70);
echo ($userinfo['c71st'] + $userinfo['c71st'] + $userinfo['c71st'] + $userinfo['c71st']) / 2 ;
?>