Hi guys! So I have something like this:
$columnas = 'id, email, DATE_FORMAT(register_date, "%d-%m-%Y %H:%i:%s") as register_date';
$results = $this->modelsManager->createBuilder()
->columns($columnas)
->from('Table1')
->orderBy('register_date DESC');
Now I want to manipulate what I get in $results. I want to create a separate ARRAY with just the emails from this resulting query.
I was thinking on something like this:
foreach($results as $result){
$email=$result->email;
array_push($arrayEmails, $email);
}
But this isn't working. I want to know how to access the elements from my $results . Can you pelase point me in the right direction? Thank you!!