Archive for February, 2018

convert string to underscore representation

strtolower(preg_replace(array(‘/([A-Z]+)([A-Z][a-z])/’, ‘/([a-z\d])([A-Z])/’), array(‘\\1_\\2’, ‘\\1_\\2’), str_replace(‘_’, ‘.’, $str)));

Leave a comment