Last active
October 17, 2016 16:40
-
-
Save matdave/484422dc1eae1de76f1feebfd3a1bcb5 to your computer and use it in GitHub Desktop.
Wrap Last Word (MODX Output Modifier)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$options = (isset($options))?$options:'span'; | |
$words = explode(" ", $input); | |
$words[count($words)-1] = '<'.$options.'>'.$words[count($words)-1]'</'.$options.'>'.; | |
return implode(" ", $words); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment