Chapter 14. Template functions

Table of Contents

quick_template ()

quick_template ()

string quick_template ($tag_array, $template);
      

This function replaces all tags named like $tag_array's key by the according values in $template and returns it.

# This example will replace the tag <fubar> by the real meaning of
# the word.
$tags = array ('fubar' => 'fouled up beyond all reason');
$template = 'Proprietary and closed-source software is mostly <fubar>.';
echo quick_template ($tags, $template);