php - Whats wrong in this code of Codeigniter view page? -
i want iterate foreach loop list of property details code shows nothing please tell me wrong in code
new php.
<?php foreach ($this->property_model->getproperty() $property): ?> <div class='properties'> <div class='image-holder'><img src='images/properties/1.jpg' class='img-responsive' alt='properties'/> <?php if (strcmp($property->status, 'new') == 0) { ?> <div class='status sold'><?php $property->status ?></div> <?php } else { ?> <div class='status new'><?php $property->status ?></div> <?php } ?> </div> <h4><a href='property-detail.php'><?php $property->property_info ?></a></h4> <p class='price'><?php $property->prize ?></p> <div class='listing-detail'> <span data-toggle='tooltip' data-placement='bottom' data-original-title='bed room'>5</span> <span data-toggle='tooltip' data-placement='bottom' data-original-title='living room'>2</span> <span data-toggle='tooltip' data-placement='bottom' data-original-title='parking'>2</span> <span data-toggle='tooltip' data-placement='bottom' data-original-title='kitchen'>1</span> </div> <a class='btn btn-primary' href='property-detail.php'>view details</a> </div> <?php endforeach; ?>
your file line of view incorrect
< php foreach($this->property_model->getproperty() $property): ?>
you forget ?
in php tag
it should be
<?php foreach($this->property_model->getproperty() $property): ?>
and can call model in controller not in view
Comments
Post a Comment