[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


insted of echoing this to the page(printing it) how can i make it in a dropdown box

Posted on 2004-10-22
Medium Priority
Last Modified: 2008-03-06
the below code outputs this to the screen how do i get the info to be in a dropdown box(combobox)

for($i = 0; $i < $Users->Count; $i++){
    $MailBox->UserName = $Users->Items($i)->UserName;

     echo "UserName       : " . $Users->Items($i)->UserName ."<br>";

aka Pern
Question by:Johnny
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 27

Accepted Solution

Diablo84 earned 2000 total points
ID: 12382488
Something like this should work for you

<select name="username">
for($i = 0; $i < $Users->Count; $i++){
 echo "<option>" . $Users->Items($i)->UserName ."</option>";

Author Comment

ID: 12382954
perfect thx
LVL 27

Expert Comment

ID: 12385646
no problem :)

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question