PHP code example of stoatally / dom
1. Go to this page and download the library: Download stoatally/dom library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stoatally / dom example snippets
use Stoatally\Dom\DocumentFactory;
$factory = new DocumentFactory();
$document = $factory->createFromString('<p/>');
$document->select('p')->setContents('PHP <3');
// > <p>PHP <3</p>