How to insert values to a table with Symfony?

0

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();
                  }
               }
    
asked by Paulo Mayoral 23.07.2018 в 00:57
source

0 answers