Eythan Fellous Eythan Fellous - 10 months ago 42
PHP Question

PHP tag is not recognized in HTML

I'm trying to implement a PHP tag in HTML but, it doesn't work and I don't understand why.

It's not a Webserver problem , look the code error is on the code

PHP file:

<div class="row">
<div class="col-xs-12 results-count">
<?php if ($hebergement['count'] == 1){ ?>
hébergement correspond à votre recherche
<?php } else { ?>
<strong><?php echo $hebergements['count']; ?></strong> hébergements correspondent à votre recherche
<?php }?>

Answer Source

try this:

   <div class="row">
    <div class="col-xs-12 results-count">
        <?php if ($hebergement['count'] == 1)
                echo "hébergement correspond à votre recherche";
                    echo"<strong>.$hebergements['count'].</strong>hébergements correspondent à votre recherche";

hope thi help you a little

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download