首先我的mysql表土地是:NL,BE,DE,AF如果它等于选项值而不是选择该选项,我想先爆炸而不是我想要爆炸的单词
$resultxx = mysql_query("SELECT * FROM page where page_id = '$page_id'") or die(mysql_error());
$number=mysql_num_rows($resultxx);
while($land = mysql_fetch_array($resultxx)){
$exp = explode(',', $land['land']);
}
$count = 0;
//Check if space exists in substrings
foreach ($exp as $code) {
if (strpos(trim($code), ' ') == false) { //strpos better for checking existance
$count++;
$land = constant(COUNTRY_.$code);
?>
<option selected value="<?php echo $code; ?>"><?php echo $land; ?></option>
<?php
}}
?>
</select>