Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $result_cat = $conexao->prepare("SELECT * FROM colecoes WHERE activo = :activo");
- $result_cat->bindValue(':activo', 1, PDO::PARAM_INT);
- $result_cat->execute();
- $row_cat_l = $result_cat->fetchAll(PDO::FETCH_OBJ);
- $qtd = count($_REQUEST['categorias_estabelecimentos']);
- for ( $i = 0; $i < $qtd ; $i++ ) {
- $cat = $_REQUEST['categorias_estabelecimentos'];
- }
- foreach ($row_cat_l as $row_cat) {
- ?>
- <label class='checkbox inline'>
- <input type="checkbox" <?=(in_array($row_cat->slug, $cat)?'checked="checked"':NULL)?> name="categoria[]" value="<? $row_cat->slug; ?>" />
- <?= $row_cat->titulo; ?>
- </label>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement