Skip to content

TheLiveitup34/Embed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embed

Embed is a parser to translate text into PHP variables given in a array from a HTML document

Clone and run for a quick way to see Embed in action.

git clone https://github.com/RKStudioTM/Embed
cd Embed

Embed parser needs just this file:

  • embed.php - Parses the file and displays the finalized output with given data

To Use Embed

To clone and run this repository you'll need Git and a PHP server installed on your computer. From your command line:

# Clone this repository
git clone https://github.com/RKStudioTM/Embed

# Call class in php 
require_once('embed.php');
# Loads file from Directory
$embed = new Embed(DIRECTORY_URL_HERE);

# Calls to parse and translate data to output
$embed->callFile(DATA_ARRAY_HERE);

Example Data array

# Data can be as such
$data = [
    "title" => "This is a title" 
];

# Called on output file as such
{{ title }}

License

MIT License

About

Embed is a parser to translate text into PHP variables given in a array from a HTML document

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published