I have the following code, but keep running into a syntax error on line 7, saying "Parse error: syntax error, unexpected 'htmlentities' (T_STRING)." Is this not the correct way to echo php and html at the same time? Any help is appreciated!
<?php
$stmt = $pdo->query("SELECT first_name, last_name, department, website filename FROM Profile");
while ( $row = $stmt->fetch(PDO::FETCH_ASSOC) ) {
  echo('<div class="col-sm-3">
      <img class="img-rounded" src="'.$row['filename'].'"/>
    <p class="caption">');
  echo('<a href="'htmlentities($row['website'])'">'.($row['first_name']).' '.htmlentities($row['last_name']).'</a>')
  echo(', '.htmlentities($row['department']));
  echo('</p> </div>');
}
?>
 
     
     
     
     
     
    