[ create a new paste ] login | about

Link: http://codepad.org/PV4nU2bU    [ raw code | output | fork ]

aceballos - PHP, pasted on Apr 22:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

# --------------------------------- [ lang_UNIV.php (fragment)

   $hash_CUR = array( 
      "USD" => "US Dollar",  
      "MXP" => "Peso mexicano",
      "EUR" => "Euro" 
      );
      
# --------------------------------- [ auxiliary

   print "<select name='currency'> \n";
   foreach ($hash_CUR as $str_thisID => $str_thisname) {
      print "   <option value='$str_thisID'> $str_thisname </option> \n";
      }
   print "</select>";

?>


Output:
1
2
3
4
5
<select name='currency'> 
   <option value='USD'> US Dollar </option> 
   <option value='MXP'> Peso mexicano </option> 
   <option value='EUR'> Euro </option> 
</select>


Create a new paste based on this one


Comments: