/ Published in: PHP
The PHP version of simpleStringMaker has an argument to replace spaces with hyphens.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function simplestringmaker ( $thestring, $hyphens ) { $newstring = ''; if ( ($c > 47 && $c < 58) || ($c > 96 && $c < 123) || ($c > 64 && $c < 91) ) { } else if ( $c == 32 && $hyphens ) { $newstring .= '-'; } } echo $newstring; } simplestringmaker ( "It's 419: Gotta Minute..?!", 0 );