Suchy Posted January 31, 2008 Share Posted January 31, 2008 <select name="id"> <?php foreach($results as $x) { ?> <option value="<?= $x['id'] ?>"> <? printf ("%.40s", $x['name']) // limit name to 40 letters ?> *** id: <?= $x['id'] ?> *** added: <? printf ("%.16s", $x['date']) ?> </option> <?php } ?> </select> here is how it looks: Is it possible to line up the results so the dropdown will look like this: ??? Quote Link to comment Share on other sites More sharing options...
AndyB Posted January 31, 2008 Share Posted January 31, 2008 http://ca.php.net/manual/en/function.str-pad.php Probably the function you need to use on the name before concatenating it into the option string Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.