PHP code example of gears / view

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

    

gears / view example snippets


// Make sure you have composer included
 new Gears\View('/path/to/my/views');

// Next you will probably want to make the view object global.
$views->globalise();

echo View::make('greeting', array('name' => 'Brad'));

<!-- View stored in /path/to/my/views/greeting.php -->

<html>
    <body>
        <h1>Hello,  echo $name; 

$views = new Gears\View(['/views/specific', '/views/generic']);