One more R function question

This below basically works, but 'var1' is not working.   In SAS, this would be "&var1".  How do I do that in R?

kaz_macro2<-function(var1){
x1<-  Summarize(GrowthMindset ~ treat+ dataID, data=var1)
x1$varname<-"GrowthMindset"
x1$sample_type<-'var1'
x2<-   Summarize(SelfEfficacy ~ treat+ dataID, data=var1)
x2$varname<-"SelfEfficacy"
x2$sample_type<-'var1'
x3<-   Summarize(MSelfEfficacy ~ treat+ dataID, data=var1)
x3$varname<-"MSelfEfficacy"
x3$sample_type<-'var1'
x4<-   Summarize(MathAnxiety ~ treat+ dataID, data=var1)
x4$varname<-"MathAnxiety"
x4$sample_type<-'var1'
x5<-   Summarize(TeacherUse ~ treat+ dataID, data=var1)
x5$varname<-"TeacherUse"
x5$sample_type<-'var1'
as.data.frame(rbind(x1,x2,x3,x4,x5))
}
temp1234<-kaz_macro2(wholedata2)

php/MySQL question

日本語が文字化けするのですが、どうしたら直るでしょうか?

<html>
<head><title>Kaz's program</title></head>
<body>
<?php

header('Content-Type: text/html; charset=utf-8');

include "<here I specify a file that has password info>";
$con=mysqli_connect($host,$user,$passwd,$dbname) or die ("Didn't connect, Man.");
$query="SELECT * FROM wp_posts where ID=5";
$result=mysqli_query($con,$query)
or die ("Didnt work.");
$row=mysqli_fetch_assoc($result);
printf ("%s (%s)\n",$row["ID"],$row["post_content"]);
?>

</body></html>