我有以下需要以完全相同的方式处理的变量。如何使用循环简化此代码?
$var1 = Trim(stripslashes($_POST['var1']));
$var2 = Trim(stripslashes($_POST['var2']));
$var3 = Trim(stripslashes($_POST['var3']));
$var4 = Trim(stripslashes($_POST['var4']));
$var5 = Trim(stripslashes($_POST['var5']));
$var6 = Trim(stripslashes($_POST['var6']));
$var7 = Trim(stripslashes($_POST['var7']));
$var8 = Trim(stripslashes($_POST['var8']));
翻过高山走不出你