Custom PHP HTML Parser Editor
Documentation
Download this Editor & Package
HTML
PHP
Run
Welcome {user.name}
Client
Name
Balance
<%=list dataset="clients"
{client.id}
{client.name}
R{client.balance}
=%>
List of Clients with Balances > 0
Client
Name
Balance
<%=list dataset="clients" =%>
Products
<%=list dataset="products"
{products.name} {products.desc}
=%>
Populate users using 'list dataset'
<%=list dataset="users"
{u.name}
{u.role}
=%>
Populate users using dataset.map()
<%=dataset.map("users")
{u.name}
{u.role}
=%>
Populate users using foreach()
<%=foreach("users")
{u.name}
{u.role}
=%>
Populate users using for()
<%=for("users")
{u.name}
{u.role}
=%>
'Yung Cet', '{products.total}' => 4, '{clients.total}' => 7, 'clients' => array ( array ('{client.name}' => 'Yung Cet 1', '{client.id}' => '12341', '{client.balance}' => '10'), array ('{client.name}' => 'Yung Cet 2', '{client.id}' => '12342', '{client.balance}' => '55'), array ('{client.name}' => 'Yung Cet 3', '{client.id}' => '12343', '{client.balance}' => '-100'), array ('{client.name}' => 'Yung Cet 4', '{client.id}' => '12344', '{client.balance}' => '0'), array ('{client.name}' => 'Yung Cet 5', '{client.id}' => '12345', '{client.balance}' => '-60'), array ('{client.name}' => 'Yung Cet 6', '{client.id}' => '12346', '{client.balance}' => '30'), array ('{client.name}' => 'Yung Cet 7', '{client.id}' => '12347', '{client.balance}' => '30') ), 'clients_test' => array ( array ('{client.name}' => 'Yung Cet 1', '{client.id}' => '12341', '{client.balance}' => '10'), array ('{client.name}' => 'Yung Cet 2', '{client.id}' => '12342', '{client.balance}' => '55'), array ('{client.name}' => 'Yung Cet 3', '{client.id}' => '12343', '{client.balance}' => '-100'), array ('{client.name}' => 'Yung Cet 4', '{client.id}' => '12344', '{client.balance}' => '0'), array ('{client.name}' => 'Yung Cet 5', '{client.id}' => '12345', '{client.balance}' => '-60'), array ('{client.name}' => 'Yung Cet 6', '{client.id}' => '12346', '{client.balance}' => '30'), array ('{client.name}' => 'Yung Cet 7', '{client.id}' => '12347', '{client.balance}' => '30') ), 'users' => array ( array ('{users.name}' => 'Yung Cet', '{users.role}' => 'Software Engineer'), array ('{users.name}' => 'Cedric Maenetja', '{users.role}' => 'Managing Director') ), 'products' => array ( array ('{products.name}' => 'Product 1', '{products.desc}' => 'description'), array ('{products.name}' => 'Product 2', '{products.desc}' => 'description'), array ('{products.name}' => 'Product 3', '{products.desc}' => 'description'), array ('{products.name}' => 'Product 4', '{products.desc}' => 'description') ) ); $htmlparser = new App\Custom\HTMLParser (file_get_contents ('__INDEX__'), $data); // do not change _INDEX_, this refers to the HTML on this editor $htmlstring = $htmlparser->GetSubstitutedString(); // add a return statement to render the HTML in the browser return (App\Custom\Error::IsAnError ($htmlstring)) ? $htmlstring->GetError() : $htmlstring; ?>