string oBXEditorUtils.PHPParser.trimPHPTags( string sCode );
The oBXEditorUtils.PHPParser.trimPHPTags method strips <?php ?> or <? ?> off the PHP tags passed as the parameter. If the input does not contain PHP tags, the original string is returned.
trimPHPTags can be used to simplify the PHP code parsing when creating a PHP parser.
Parameter | Description |
---|---|
sCode | The string which is a PHP code fragment. |
<script> var sCode = '<?php MyPHPFunction(); ?>'; sCode = oBXEditorUtils.PHPParser.trimPHPTags(sCode);//sCode = ' MyPHPFunction(); '; </script>See also trimQuotes.
© 2001-2007 Bitrix | Bitrix Site Manager |