$mailbody=<<
name $_post['username']
promotion code $_post['promotion']
mobilephone $_post['mobilephone']
age $_post['age']
sex $_post['sex']
address }$_post['address']
prescription type $_post['prescription']
single pd $singlepd
right pd $rightpd
left pd $leftpd
right od sph $_post['odsph']
left os sph $_post['ossph']
od cyl $_post['odcyl']
os cyl $_post['oscyl']
od axis $_post['odaxis']
os axis $_post['oxaxis']
mailbody;
echo mailbody;
------解决方案--------------------
把形如 $_post['productnumber'] 的改为 {$_post['productnumber']} 这样