Welcome Guest, Not a member yet? Register   Sign In
Inflector - humanize & underscore
#3

[eluser]roosterboy[/eluser]
But the preg_replace call is necessary to handle multiple consecutive whitespace characters and convert them into a single underscore (or vice versa).

thepyromaniac, are you sure nothing else is going on with your code? I have no trouble with the following:
Code:
echo humanize( 'foo' ); //outputs Foo
echo humanize( 'foo_bar' ); //outputs Foo Bar


Messages In This Thread
Inflector - humanize & underscore - by El Forum - 07-15-2007, 06:47 AM
Inflector - humanize & underscore - by El Forum - 07-15-2007, 08:30 AM
Inflector - humanize & underscore - by El Forum - 07-15-2007, 09:56 PM
Inflector - humanize & underscore - by El Forum - 07-16-2007, 06:38 PM
Inflector - humanize & underscore - by El Forum - 07-16-2007, 09:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB