Codeasearch.com - Search your code with us Login | Register | Contact us
  Forums > Php > select box with wrap
dubaiselvam
Posted on Nov 23, 2008
Join Date: November 2008
Location: United arab emirates ( Dubai )
Posts: 6
 
select box with wrap  

is it possible to bring the values with wrap in
multiple select box?

benaya
Posted on Nov 23, 2008
Join Date: June 2007
Location: India ( Chennai )
Posts: 90
 
RE : select box with wrap  

<form action="test1.php" method="post">
<select name="selCategory[]" id="selCategory" multiple="multiple">
<option value="0">--Select--</option>
<option>A Test</option>
<option>B</option>
<option>C</option>
<option>D</option>
</select>
<input type="submit" value="Submit" name="btnSubmit" />
</form>

<?php
if($_REQUEST["btnSubmit"]!="") {
for($intI=0;$intI<=count($_REQUEST["selCategory"]);$intI++) {
echo str_replace(" ","<br />",$_REQUEST["selCategory"][$intI])."<br />";
}
}
?>

benaya
Posted on Nov 23, 2008
Join Date: June 2007
Location: India ( Chennai )
Posts: 90
 
RE : select box with wrap  

Hi,
Like this you want.

<form action="test1.php" method="post">
<select name="selCategory[]" id="selCategory" multiple="multiple">
<option value="0">--Select--</option>
<option>A</option>
<option>B</option>
<option>C</option>
<option>D</option>
</select>
<input type="submit" value="Submit" name="btnSubmit" />
</form>

<?php
if($_REQUEST["btnSubmit"]!="") {
for($intI=0;$intI<=count($_REQUEST["selCategory"]);$intI++) {
echo $_REQUEST["selCategory"][$intI]."<br />";
}
}
?>

 Hot Discussion
Go Tech launches Android tablet for Rs 3,999...
Sony targets retailers with quick sales pitches and rew...
Share and discover new activities with Google Schemer...
Samsung gets 9 mn preorders for Galaxy S3: Report...
Google revamps search engine to think like a person...
 
 Discussion Topics
IT News
Php
Javascript
Technology Updates
Asp.Net
MySql
Ajax
Html
Fedora
Software Testing
Asp
Java
General
Flash
Ruby on Rails