Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:53:38+00:00 2026-06-03T11:53:38+00:00

I just started with ZEND Framework Forms. I want to make an easy guestbook

  • 0

I just started with ZEND Framework Forms. I want to make an easy guestbook in my first abstract project. For my guestbook i use 5 colomns in table “gastenboek”. There is also one datetime field. I want to show the data in the Views like something in this order:

DATE_FORMAT(gastenboek.date,’%d-%m-%Y %H:%i’) AS gastenboek_date

How can i do this in Zend framework, do i have to adjust something in the controller before fetchall?
Or can i do something after that, before i assign the array to the Views?

My controller:

    class GastenboekController extends Zend_Controller_Action
    {

        public function init()
        {
            /* Initialize action controller here */
        }

        public function indexAction()
        {
            $entries = new Application_Model_DbTable_Gastenboek();
            $test = $entries->fetchAll();

            $paginator = Zend_Paginator::factory($test);
            $paginator->setItemCountPerPage(3);
            $paginator->setCurrentPageNumber($this->_request->getParam('page'));

            $this->view->assign('entries' ,$paginator);
        }
}

And Smarty Views gastenboek\index.tpl

<h2>Gastenboek</h2>

<table>
    {foreach from=$entries item=entry}
    <tr>
        <td><strong>Naam: {$entry.naam} {$entry.date} </strong></th>
    </tr>
    <tr>
        <td>{$entry.bericht}</td>
    </tr>
    {/foreach}
</table>

Greetz Eric

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:53:39+00:00Added an answer on June 3, 2026 at 11:53 am

    If your date formatting is view specific, I would do it in the view itself:

    <td><strong>Naam: {$entry.naam} {date('d-m-Y H:i', strtotime($entry.date))} </strong></th>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just getting started with a big Zend Framework project. One thing confuses
I have just started working on a project and I am using zend framework
Just started a new job, working with the zend framework, the project is essentially
I just started learning the zend framework and what im wondering is , is
Just started my first WCF rest project and would like some help on what
Just started working with the Zend Framework Zf Tool and I've already come across
I just started to use Zend Mail Compoment and i need pop before smtp,
Recently I've started to use Zend framework next to my own framework. The solution
i have learned MVC Architecture from Zend Framework, and i just started learning in
I am new to Zend framework and have just started working on it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.