I'm using symfony, to insert an xml into a database. already made the journey to xml, now I need to learn how I store it in the table, without consultation.
foreach ($matchInfo->children() as $matchOfficials){
foreach ($matchOfficials->attributes() as $key => $value) {
$arbitro = 0;
$row = 0;
while ($row = $arbitro->$row) {
$arbitro = new Arbitro();
$arbitro->setNombre($arbitro['FirstName']);
$arbitro->setApellido($arbitro['LastName']);
$arbitro->setUid($arbitro['Uid']);
$entityManager->persist($arbitro);
}
$entityManager->flush();
}
}