Insert bootstrap module into PHP? -


i'm trying show bootstrap module dialog box confirm delete on database.

so code have:

<?php  //sample pop  if ($delete_category_id > 0) {            <div class="source-code runnable">                 bootstrapdialog.alert('i want banana!');             </div>;             //$da->delete_category($delete_category_id);         } ?> 

i've tried inserting echo's divs bootstrapdialog box doesn't work supposed (or @ actually).

how can insert , have work inside php?

there couple of solutions this, 1 be:

    <?php if ($delete_category_id > 0) { ?>        <div class="source-code runnable">             bootstrapdialog.alert('i want banana!');         </div>     <?php } ?> 

another 1 be:

    <?php if ($delete_category_id > 0) {        echo <<<html         <div class="source-code runnable">             bootstrapdialog.alert('i want banana!');         </div> html;     } ?> 

Popular posts from this blog