function displayProfile($user, $adventures)
{
    echo "<h1>" . $user->getUsername() . "</h1>";
    echo "<h3>nationality :</h3>" . $user->getCountry() . "";
    echo "<h3>role :</h3>" . $user->getRole() . "";
    echo "<h3>all adventures from this author :</h3>";
    if (isset($adventures)) {
        foreach ($adventures as $adventure) {
            displayAdventureCompactForm($adventure);
        }
        if (count($adventures) == 0) {
            echo "<p>This user has not shared any adventures yet</p>";
        }
    }
}
<?php

require_once 'common_functions.php';
?>
<html>
<head>
    <title>Walk-a-blog | All Adventures</title>
    <link rel="stylesheet" href="./views/style.css" type="text/css"/>
</head>
<body>
<div id="container">
<?php 
include 'header.php';
?>
		<div id="content">
			<?php 
if (isset($adventures)) {
    for ($i = 0; $i < sizeof($adventures); $i++) {
        displayAdventureCompactForm($adventures[$i]);
    }
}
?>
		</div>
	</div>
	<?php 
include 'footer.php';
?>
</body>
</html>
<head>
    <link rel = "stylesheet" href = "./views/style.css" type="text/css">
    <link rel = "stylesheet" href = "style.css" type="text/css">
    <link rel ="shortcut icon" href="./views/Images/globe.ico">
    <title>Walk-a-blog | Home</title>
</head>
<body>
<div id="container">
<?php 
include 'header.php';
?>
    <div id="content">
        <h1>Welcome to Walk-a-blog!</h1>
        <p>This website is all about travelling. Share your experience with other travellers. Click the link below to sign up!</p>
        <div id="adventure-container">
          <?php 
if (isset($adventures)) {
    foreach ($adventures as $adventure) {
        displayAdventureCompactForm($adventure);
    }
}
?>
        </div>
    </div>
</div>
<?php 
include 'footer.php';
?>
</body>
</html>