0
//include.php
define('OPTION_0', 'Essence of population');
define('OPTION_1', 'Passport request/extend');
define('OPTION_2', 'Request logging concession');
//form.php
<select name="sort">
<option value="0"><?php echo(O_0) ?></option>
<option value="1"><?php echo(O_1) ?></option>
<option value="2"><?php echo(O_2 ?></option>
</select>
//show.php
extract($_POST); //The variable $sort has the value 1,2 or 3
echo("This is your choice");
echo(OPTION_ . $sort); //I want to use de constant e.g. OPTION_2
我想回显匹配常量的值。 所以,当我在form.php中选择第二个值时,它现在给$排序1 的值,现在我想使用常量OPTION_1。使用变量的php调用常量
有人可以帮助我吗?
空洞的常数的目的 –