mgd_include_snippet
mgd_include_snippet -- Include a snippet
Description
`void **mgd_include_snippet** (string snippet_path)`
Minimum version: Midgard 1.4 (Bifrost)
Includes and executes content of a snippet record corresponding to the snippet_path above. This function actually is PHP statement equal to include() or eval() but gets its content from Midgard database.
This function has no return value.
Note: when you include a snippet, the same thing happens as in an usual PHP include statement. For that reason (to save the reader from going to the PHP manual) I will include the following:
An important note about how this works is that when a file is include()ed or require()ed (or in midgard: mgd_include_snippet()ed, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags.
