cScript Functions
All cTemplate Directives are available in cScript as functions, with the following additions and differences. It is also possible to create your own custom functions.
- debug_echo()
- php($eval_string) - Evaluate string as PHP code and return result.
- php_export($expression) - Call's PHP var_export($expression, TRUE).
- regex_match($pattern,$subject) - Call PHP preg_match() and return if there was a match (TRUE or FALSE).
- regex_replace($pattern,$replacment,$subject) - Call PHP preg_replace().
- regex_select($pattern,$subject,$index=NULL) - Call PHP preg_match() and return the array of matches (if index=NULL) or a specific match (if index=n).
- variable_scope()