[eluser]ChrisF79[/eluser]
This is a very remedial question I'm sure but I have the following:
Controller
Code:
$data['records'] = $this->property_model->getOneProperty($data['mls_listing_id']);
$this->load->view('property', $data);
Model
Code:
(query here)
if($q->num_rows() > 0) {
foreach ($q->result() as $row) {
$data[] = $row;
}
return $data;
View
Code:
<?php foreach ($records as $r) : ?>
<th>Asking Price:</th>
<td>$<?php echo number_format($r->SALE_PRICE); ?></td>
I've trimmed most of the detail away for a simple example.
My question is, the query pulls things like the street number, street name, city, state, zip, etc. I want to combine all of that into a "address" variable. How do I do it in my model so that I can use it as $r->address; in my view?