Display items HTML ListBox from PHP array list. 
To retrive itmes from a PHP array to a ListBox and display that.

<?php
$items = array('country' => array(1 => 'India',
2 => 'Pakistan',
3 => 'England',
4 =>'Japan',
));
$tm1 = &$items['country'];
$i=0;

?>

*************

<html>
<body>
<form>
<select name="select1" size="5">
<? foreach ($tm1 as $k => $v) { ?>
<option value="<?= $k?>"><?= $v?></option>
<?
}
?>
</select>
</form>
</body>
</html>

[ add comment ] ( 1 view )   |  permalink  |   ( 3.1 / 16 )

<<First <Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next> Last>>