cs_parse_string — Parse a CS template string.
bool cs_parse_string( | cs, | |
template); |
resource cs;string template;
Parses a template string template, adding it to the CS context cs. Returns true on successful parsing, false otherwise.
Example 23. cs_parse_string example
<?php
$hdf = hdf_init();
hdf_set_value($hdf, 'message', 'Hello World!');
$cs = cs_init($hdf);
$template = 'Your message is "<?cs var message ?>".';
if (!cs_parse_string($cs, $template)) {
die('Failed to parse template');
}
?>