PHP code example of jacob-roth / php-helpers

1. Go to this page and download the library: Download jacob-roth/php-helpers 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/ */

    

jacob-roth / php-helpers example snippets


    $PdoWrapperInstance->SqlExecution($sql, $vars, [PDO::FETCH_CLASS, User::class], "fetch");

    $PdoWrapperInstance->SqlExecution($sql, [], [PDO::FETCH_COLUMN, 0], "fetchAll");
    

    $PdoWrapperInstance->SaveChanges();
    

    $logger = new Logger("path/to/file.log");
    $logger->log("hello world!");
    $logger->log("hello world!", LogLevel::Warn);
    

    \PhpHelpers\Util::DebugPrint($dataToOutput, "A Label To Describe Data");
    
bash
    php UpdateSqlClasses.php