<?php class ControllerModuleNews extends Controller { protected function index() { $this->language->load('module/news'); $this->load->model('extension/news'); 'page' => 1, 'limit' => 6, 'start' => 0, ); $this->data['heading_title'] = $this->language->get('heading_title'); $all_news = $this->model_extension_news->getAllNews($data); foreach ($all_news as $news) { 'title' => (strlen(strip_tags(html_entity_decode($news['title']))) > 100 ? substr(strip_tags(html_entity_decode($news['title'])), 0, 100) . '...' : strip_tags(html_entity_decode($news['title']))), 'description' => (strlen(strip_tags(html_entity_decode($news['description']))) > 250 ? substr(strip_tags(html_entity_decode($news['description'])), 0, 250) . '...' : strip_tags(html_entity_decode($news['description']))), 'view' => $this->url->link('information/news/news', 'news_id=' . $news['news_id']), ); } if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/news.tpl')) { $this->template = $this->config->get('config_template') . '/template/module/news.tpl'; } else { $this->template = 'default/template/module/news.tpl'; } $this->render(); } } function dateV($format,$timestamp=null){ 'l'=>array('dat'=>'N','str'=>array('Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota','Niedziela')), 'M'=>array('dat'=>'n','str'=>array('styczeń','luty','marzec','kwiecień','maj','czerwiec','lipiec','sierpień','wrzesień','październik','listopad','grudzień')), 'M'=>array('dat'=>'n','str'=>array('stycznia','lutego','marca','kwietnia','maja','czerwca','lipca','sierpnia','września','października','listopada','grudnia')) ); foreach ($pieces as $datepart){ }else{ } } return $result; } } // Środa 2 września 2009 ?>
Jak powiązać powyższy kod aby powyświetleniu:
<?php echo $news['date_added']; ?>
otrzymać wynik zwrócony z bazy danych w postaci: "10 kwietnia 2013 " zamiast "10 Apr 2013"
Z góry wielkie dzięki za jakąkolwiek pomoc. Będe bardzo wdzięczny za nakierowanie mnie albo wskazanie jakiegoś manuala do mojego problemu