Welcome Guest, Not a member yet? Register   Sign In
Date manipulate question
#3

[eluser]Daniel_E9[/eluser]
This was the first thing I tried and it still doesn't work saying 'Invalid argument supplied for foreach() in parser.php'.

This is my code, where article_date_time is the name of my field in the database.

ARTICLE MODEL:

Code:
function get_article() {
            $result = $this->db->get('blog_article', 2);
            return $result->result_array();
        }

CONTROLLER

Code:
function index() {
            $this->load->model('article');
            $article = $this->article->get_article();
            $article['article_date_time'] = date('Y-m-d', strtotime($article['article_date_time']));
        
            $this->parser->parse('blog', array('article' => $article));
        }

Any ideas?


Messages In This Thread
Date manipulate question - by El Forum - 11-14-2009, 02:10 AM
Date manipulate question - by El Forum - 11-14-2009, 03:35 AM
Date manipulate question - by El Forum - 11-14-2009, 03:59 AM
Date manipulate question - by El Forum - 11-14-2009, 04:19 AM
Date manipulate question - by El Forum - 11-14-2009, 04:38 AM
Date manipulate question - by El Forum - 11-14-2009, 05:27 AM
Date manipulate question - by El Forum - 11-14-2009, 05:33 AM
Date manipulate question - by El Forum - 11-14-2009, 06:18 AM
Date manipulate question - by El Forum - 11-14-2009, 06:46 AM
Date manipulate question - by El Forum - 11-14-2009, 06:52 AM
Date manipulate question - by El Forum - 11-14-2009, 07:34 AM
Date manipulate question - by El Forum - 11-14-2009, 09:32 AM
Date manipulate question - by El Forum - 11-14-2009, 10:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB