Jump to content

[SOLVED] String question


dumdumsareyum

Recommended Posts

regular expression

 

function deInterCaps($var){

  return ucfirst(ereg_replace("[A-Z]"," \\0",$var));

}

 

$interCapsString = "aLoadOfNonsenseToDemonstrateTheFunction";

 

echo deInterCaps($interCapsString);

 

// output: A load of nonsense to demonstrate the functio

 

that alos tranform the first lettet to upper if you dont want that then rumove the ucfrist

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.