PHP code example of fi1a / simplequery

1. Go to this page and download the library: Download fi1a/simplequery 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/ */

    

fi1a / simplequery example snippets


use Fi1a\SimpleQuery\SimpleQuery;

$sq = new SimpleQuery('<h1>Title</h1><form></form>');

$sq('h1')->html('Updated title');
$sq('form')->append('<button class="continue">Submit</button>');

$button = $sq('form > button');

$button->html(); // Submit
$button->hasClass('continue'); // true

echo (string) $sq;