Arraylist按日期排序

时间:2019-06-24 16:25:34

标签: php

我正在尝试按日期对职位进行排序,谁能暗示我我会非常感激?

谢谢

public function get_all_job()
{
    $artist_id = $this->input->post('artist_id', TRUE); 
    $getArtist= $this->Api_model->getSingleRow(ART_TBL, array('user_id'=>$artist_id));
    $category_id= $getArtist->category_id;

    $get_jobs = $this->Api_model->getAllJobNotAppliedByArtist($artist_id,$category_id);

    if(empty($get_jobs))
    {
      $this->api->api_message(0, 'No jobs available.');
    }
    else
    {

      $job_list = array();
      foreach ($get_jobs as $get_jobs) 
      {
        $get_jobs->avtar= base_url().$get_jobs->avtar;
        $table= 'user';       
        $condition = array('user_id'=>$get_jobs->user_id);  
        $user = $this->Api_model->getSingleRow($table, $condition);  
        $user->image= base_url().$user->image;

0 个答案:

没有答案