PHPRO.ORG

This little function will take CamelCase and return it as Camel Case, ideal for a sunday at the beach.


<?php

/**
 *
 * @Parse CamelCase to Camel Case
 *
 * @param string $string
 *
 * @return string
 *
 */
function parseCamelCase($string)
{
    return 
preg_replace('/(?<=[a-z])(?=[A-Z])/',' ',$string);
}