Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php function to convert string to camelcase

echo ucwords("hello world");
Comment

php string underscore into camelcase

function dashesToCamelCase($string, $capitalizeFirstCharacter = false) 
{

    $str = str_replace(' ', '', ucwords(str_replace('-', ' ', $string)));

    if (!$capitalizeFirstCharacter) {
        $str[0] = strtolower($str[0]);
    }

    return $str;
}

echo dashesToCamelCase('this-is-a-string');
Comment

PREVIOUS NEXT
Code Example
Php :: php remove all whitespace from a string 
Php :: php round to whole number 
Php :: difference entre deux date php 
Php :: laravel migrate refresh specific migration 
Php :: php previous page 
Php :: carbon equal dates 
Php :: debian php switch version 
Php :: break and continue in laravel 
Php :: laravel/ui for laravel 7 
Php :: store image in storage laravel 
Php :: PHP mysqli_close function 
Php :: 2 decimal round using php 
Php :: create migration laravel 
Php :: wordpress exclude current post from loop 
Php :: get absolute path php file 
Php :: store emoji in php 
Php :: find substring regx php 
Php :: how to validate video laravel 
Php :: catch any exception php 
Php :: php check session status 
Php :: wp_get_attachment alt text 
Php :: laravel make auth 
Php :: carbon now 
Php :: convert to json php 
Php :: laravel select only some columns relationship 
Php :: Ways to write comments in PHP 
Php :: is dir php 
Php :: how to get week start date in php 
Php :: check the ajax request in laravel 
Php :: full month name php 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =