Functions in View

flag Questions

So in my project i need to count how many comments each articles has , is there any way that i can run a function on my view ? Or a diffrent method ?

    <?php foreach( $articles as $id => $article ): ?>
    <div class="day"><?=(new DateTime($article->date))->format("d")?></div>
    <a class="comments pull-right" href="#"> 0 Comments </a>
    <?php endforeach; ?>
solved
Jul 3/15 at 02:08 1 Answers 24 Views 0

About the Author

Answers ( 1 )

    0
    Jul 3/15 at 02:09

    In this particular post, we intend to offer a solution to install multiple versions of Phalcon, PHP and run them on a single web server. The PHP 5.5.x and 5.6.x will be used in here, but you can replace it with other versions. Any servers that support PHP-FPM should be enough but we recommend using the Nginx for the web server. The environment using in this tutorial is Fedora OS - a Linux system.

    Preliminary Note

Leave a reply

 Prev question

Next question