Hai everybody,
i want to layout rcords in three columns.
1. previous records
2.todays records
3.nextday records

i did query.

but i have problem in display records in layout page.

how to make it .
anybody plz help me.

public function executeIndex(sfWebRequest $request)
  {
  $myplans_obj= Doctrine_Query::create()->select('m.personal_id,m.photo,m.plantitle,m.country_id,m.zone_id,m.city,m.plantype,m.about_plan,m.date,m.what,m.where_go,m.time')->from('meetnewpeople m') ;
  $result = $myplans_obj->fetchArray();
    $this->meetnewpeoples = $result;
    //var_dump($result);
$this->_groupMeetnewpeoples($this->meetnewpeoples);
//var_dump(_groupMeetnewpeoples($this->meetnewpeoples));

  }

  private function _groupMeetnewpeoples( $meetnewpeoples)
  {
//var_dump($this->meetnewpeoples);

      $todays_date=date("Y-m-d");
      $today=strtotime($todays_date);
      $current_date=array();
      $previous_date =array();
      $next_date=array();

       foreach($meetnewpeoples as $meetnewpeople)
       {

       $meetnewpeopledate = strtotime($meetnewpeople['date']);

       if($today == $meetnewpeopledate)
       {

        $current_date[] =$meetnewpeople['date'];

        else if($meetnewpeopledate <= $today)

        {

          $previous_date[]=$meetnewpeople['date'];

          }
        else
        {


          }
          }
                $current_dates[$date]=$current_date;
        $previous_dates[$date]=$previous_date;
        $next_dates[$date]=$next_date;
        //var_dump($next_dates[$date]);
        $this->meetnewpeople =$current_dates;
         $this->meetnewpeople =$previous_dates;
        //var_dump($previous_dates);
          $this->meetnewpeople =$next_dates;
        unset($current_dates);
        unset($previous_dates);
        unset($next_dates);


  }       

index.php

 <?php $i=0;

//foreach($meetnewpeoples as $meetnewpeople ):   
foreach($meetnewpeoples as $meetnewpeople_group): ?>

<div class="meetnewpeoples">
<?php //endif; ?>

    <div class="monthgroup">

    <?php foreach($meetnewpeople_group as $meetnewpeople): ?>

<p><div id="plan-content" class="float" >
<div><span class="field-label">PlanTitle: <?php echo $meetnewpeople['plantitle'] ?></span></div></br>
<div><span class="field-label">plantype: <?php echo $meetnewpeople['plantype'] ?></span></div></br>
 <div><span class="field-label">country: <?php echo $meetnewpeople['Country_id'] ?></span></div></br>
 <div><span class="field-label">zone_id: <?php echo $meetnewpeople['Zone_id'] ?></span></div></br>
 <div><span class="field-label">city: <?php echo $meetnewpeople['city'] ?></span></div></br>
 <div><span class="field-label">about_plan: <?php echo $meetnewpeople['about_plan'] ?></span></div></br>
 <div><span class="field-label">Date:<?php echo $meetnewpeople['date'] ?></span></div>
 <div><span class="field-label">meetingpoint: <?php echo $meetnewpeople['Meetingpoint'] ?></span></div></br>

 </div>
  <?php
   endforeach ?>
       </div>

  <?php 

   endforeach ?>
 </p>

 anybody plz help me.

`

Member Avatar for diafol

Place outputs into 3 variables. You can then decide whether you want a table or a container div. You seem tp have a large number of fields to display. So 3 columns seems optimistic!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.