Esempio n. 1
0
function pulisciTabellaPerPapa($html)
{
    return $html;
    $crawler = new Symfony\Component\DomCrawler\Crawler($html);
    //dump($html);
    $crawler->filter('table tr')->reduce(function ($node, $i) {
        $tipologia = $node->filter('td')->eq(0)->text();
        $remove = !in_array(strtolower($tipologia), ['bibite', 'aggiunte', 'condimenti', 'panini']);
        return $remove;
    });
    $crawler->clear();
    dd($crawler->html());
    return dd();
}