<?php
     require_once 'db.connect.php';
     require_once '/../../helpers/func/helper.php';
     require_once '/../../helpers/classes/Question.php';

     $question = new Question($conn);
     $threeQuestions = json_decode($question->getAllQuestions(10));
?>

<div class="col s12 l3">
    <h5>Recent Questions</h5>
    <ul class="recents">
<?php     
    for ($v = 0; $v < count($threeQuestions); $v++){ 
?>
        <li id = "little">
            <a href="question.php?id=<?php print $threeQuestions[$v]->id ?>&title=<?php print replace_dashes($threeQuestions[$v]->topic, true) ?>">
                <span><?php print $threeQuestions[$v]->topic ?></span>
            </a>
        </li>
<?php
    }
?>
    </ul>
</div>