<th>No of Photos</th>
                  <th>is Featured?</th>
                  <th>Action</th>
              </tr>

          </thead>
          <tbody>
              <?php 
if ($realestates != null) {
    $ind = 1;
    foreach ($realestates as $realestate) {
        $featured = "no";
        if ($realestate->featured == 1) {
            $featured = "yes";
        }
        $no_of_photos = $controllerPhoto->getNoOfPhotosByRealEstateId($realestate->realestate_id);
        $extras = new Extras();
        $updateUrl = $extras->encryptQuery1(KEY_SALT, 'realestate_id', $realestate->realestate_id, 'realestate_update.php');
        $deleteUrl = $extras->encryptQuery1(KEY_SALT, 'realestate_id', $realestate->realestate_id, 'realestates.php');
        $featuredUrl = $extras->encryptQuery2(KEY_SALT, 'realestate_id', $realestate->realestate_id, 'featured', $featured, 'realestates.php');
        $viewUrl = $extras->encryptQuery1(KEY_SALT, 'realestate_id', $realestate->realestate_id, 'photo_realestate_view.php');
        $photoUrl = $extras->encryptQuery1(KEY_SALT, 'realestate_id', $realestate->realestate_id, 'photo_realestate_insert.php');
        echo "<tr>";
        echo "<td>{$realestate->realestate_id}</td>";
        echo "<td>{$realestate->price}</td>";
        echo "<td>{$realestate->address}</td>";
        echo "<td>{$no_of_photos} Photo(s)</td>";
        if ($realestate->featured == 1) {
            echo "<td><a href='{$featuredUrl}'>No</a></td>";
        } else {
            echo "<td><a href='{$featuredUrl}'>Yes</a></td>";