by
104 8
0
4
5,648
1
Top 1% !
Pearl of Wisdom
Specified
OpenSource
Popularity: 1135th place
Created
Modified Feb 23, 2017

Published on:

No tags for this snippet yet.
Languagephp
LicenseMIT_X11

Llenar un SELECT OPTION con PHP con info de la BD

Llenar un SELECT OPTION con PHP con info de la BD
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1679068/Llenar-un-SELECT-OPTION-con-PHP-con-info?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
// $ctlTipoProveedor es una clase que obtiene sus datos desde la bd <?php foreach ($ctlTipoProveedor->listarTodos($link) as $k) { if ($k->getId() == $proveedor->getTipoProveedor()){ echo "<option value=".$k->getId()."' selected>Proveedor ".$k->getNombre()."</option>"; } else { echo "<option value=".$k->getId()."'>Proveedor ".$k->getNombre()."</option>"; } } ?>
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus