i have a problem with php in arrays.
i have a db table like that , it shows applications to job.

What i want is to order job titles with their files for example
title must be shown :
WEB Tasarım Uzmanı
noktamedya.com/CVs/zsdfsdfsdfsdfsdf.docx
noktamedya.com/CVs/zsdfsdfsdfsdfsdf.docx
İçerik Yöneticisi
noktamedya.com/CVs/abc.docx
noktamedya.com/CVs/abc.docx
i have a class which takes to important record from db
public function getAllRec()
{
$query = "SELECT * FROM applyRecords ";
$resultDb = $this->db->query ($query);
$jobs = array ();
while ( $row = $resultDb->fetchObject () ) {
$job = new Job ();
$job->title = $row->jobTitle;
$job->url = $row->file;
$jobs [] = $job;
}
return $jobs;
}
i have here to file and jobTitle.
in admin inc. i call this function like that
$jobs3 = $jobHome->getAllRec();
and try to order with their jobTitle but have error and dont understand
foreach($jobs3 as $job)
{
$groupJobs = [$job->title][$job->url] = $job;
}
what’s wrong here?
I think this is what you are trying to do:
Group job applications by title of job applying to