- Output for 8.1.0 - 8.1.26, 8.2.0 - 8.2.13, 8.3.0
- Parse error: syntax error, unexpected token "public", expecting end of file in /in/ZUk8u on line 3
Process exited with code 255.
<?php
public function add(Enrollee $enrollee): void
{
$properties = $enrollee->getListOfProperties();
foreach ($properties as $key => $fieldName) {
$name = $fieldName;
$value = $enrollee->get($fieldName);
$statement = $this->pdo->prepare("INSERT INTO personalInf ($name) VALUE (:value)");
$statement->bindValue(':value', $value);
$statement->execute();
}
}