尝试在多维数组中打印值以形成预设值

I'm currently working on a project where my current goal is to print information about the specific user on the final checkout form inputs.

First off I gather the information of the specific user through a public function:

public function getUserAddress($dbh)
{
    $sql = "SELECT street, zip, city FROM address WHERE user_id=:user";
    $stmt = $dbh->prepare($sql);
    $stmt->bindParam(':user', $this->uid);
    $stmt->execute();
    $userAddress = $stmt->fetchAll(PDO::FETCH_ASSOC);
    $this->userAddress = $userAddress;
    return $this->userAddress;
}

Then I store the information in a variable I call $userAddress

$userAddress = $user->getUserAddress($dbh);

Since the user has two addresses, both with a "Street", "City" & "Zip" I'm storing both arrays in $templateData. This way I can specify what index should be printed out in which input tag instead of having to create a new function for each slot.

$templateData['user']['address'] = $userAdress['street']." ".$userAddress['city']." ".$userAddress['zip'];

However, printing these out seems near impossible. When I var_dump $templateData['user']['address'] I only seem to be getting 2 empty strings and nothing else.

This is just code from my Checkout.controller but somehow the information doesn't seem to be found in my template page. All routes and includes are correct so dw about that.

I'm quite new to all this so I'd appreciate any help I can get!

Image of how the information should be presented https://gyazo.com/40fa06832207bd785ee038af4962bb1e

So in this case: "Postort" = "City" & "Gatuadress" = "Street"

PDO::fetchAll(PDO::FETCH_ASSOC) will return an array of associative arrays; so to access the individual elements you need something like:

 $userAdress[0]['street']." ".$userAddress[0]['city']." ".$userAddress[0]['zip']

I could alaways define every single one of them specifically although it seems far fetched. Something like this:

 $templateData['user']['address'][0]['street'] = $userAddress[0]['street'];
 $templateData['user']['address'][0]['city'] = $userAddress[0]['city'];
 $templateData['user']['address'][0]['zip'] = $userAddress[0]['zip'];

 $templateData['user']['address'][1]['street'] = $userAddress[1]['street'];
 $templateData['user']['address'][1]['city'] = $userAddress[1]['city'];
 $templateData['user']['address'][1]['zip'] = $userAddress[1]['zip'];

I'm basically looking for another solution which doesn't require so much repetition.