php - Smarty 3 Exit Tag -
in smarty 3 using
1 - {break}
break; continue; keyword
2- {continue}
used continue;
keyword have written custom plugin exit tag same break
<?php /* * modified exit tag */ function smarty_compiler_exit( $contents, &$smarty ) { return 'exit;'; } ?>
but when use {exit}
gives output :- exit; not working php exit keyword
why not use return
?
compiler.return.php
<?php function smarty_compiler_return($tag_arg, &$smarty) { return "<?php return;?>"; } ?>
so when call {return}
within tpl, returns flow php.
Comments
Post a Comment