欧元符号没有出现在HTML中

时间:2012-03-27 16:43:11

标签: php html forms options euro

我的网站上有一个页面,其中包含用于编辑事件信息和将其更新到数据库的表单。我有一个选择框,其中包含入场价格选项,在我的HTML代码中都有一个欧元符号,但在网页上显示为 1。我在相同代码的其他页面上有完全相同的入场价选择输入,它们工作正常,有人可以帮忙吗?

<p class='form_box_text'>Admission:
  <select name='admission' id=''>
    <option value=''></option>
    <option value='Free' "; if($admission=='Free') echo("selected=\ "selected\" "); echo ">Free</option>
    <option value='€1' "; if($admission=='€1') echo("selected=\ "selected\" "); echo ">€1</option>
    <option value='€2' "; if($admission=='€2') echo("selected=\ "selected\" "); echo ">€2</option>
    <option value='€3' "; if($admission=='€3') echo("selected=\ "selected\" "); echo ">€3</option>
    <option value='€4' "; if($admission=='€4') echo("selected=\ "selected\" "); echo ">€4</option>
    <option value='€5' "; if($admission=='€5') echo("selected=\ "selected\" "); echo ">€5</option>
    <option value='€6' "; if($admission=='€6') echo("selected=\ "selected\" "); echo ">€6</option>
    <option value='€7' "; if($admission=='€7') echo("selected=\ "selected\" "); echo ">€7</option>
    <option value='€8' "; if($admission=='€8') echo("selected=\ "selected\" "); echo ">€8</option>
    <option value='€9' "; if($admission=='€9') echo("selected=\ "selected\" "); echo ">€9</option>
    <option value='€10' "; if($admission=='€10') echo("selected=\ "selected\" "); echo ">€10</option>
    <option value='€11' "; if($admission=='€11') echo("selected=\ "selected\" "); echo ">€11</option>
    <option value='€12' "; if($admission=='€12') echo("selected=\ "selected\" "); echo ">€12</option>
    <option value='€13' "; if($admission=='€13') echo("selected=\ "selected\" "); echo ">€13</option>
    <option value='€14' "; if($admission=='€14') echo("selected=\ "selected\" "); echo ">€14</option>
    <option value='€15' "; if($admission=='€15') echo("selected=\ "selected\" "); echo ">€15</option>
    <option value='€16' "; if($admission=='€16') echo("selected=\ "selected\" "); echo ">€16</option>
    <option value='€17' "; if($admission=='€17') echo("selected=\ "selected\" "); echo ">€17</option>
    <option value='€18' "; if($admission=='€18') echo("selected=\ "selected\" "); echo ">€18</option>
    <option value='€19' "; if($admission=='€19') echo("selected=\ "selected\" "); echo ">€19</option>
    <option value='€20' "; if($admission=='€20') echo("selected=\ "selected\" "); echo ">€20</option>
  </select><span id='required'>*</span>
</p>

3 个答案:

答案 0 :(得分:12)

尝试用&euro;替换欧元符号:€

答案 1 :(得分:3)

您可以使用三种不同的技术来显示欧元符号:

&euro;
&#8364;
&#x20AC;

有关详情,请参阅this PAGE

答案 2 :(得分:3)

<?php echo "&euro;'"; ?>

<p> &euro; </p>

<p> &#8364;</p>

<p>&#8364;</p>

将起作用