May 25, 2004 #1 rjonesX Technical User Joined Jun 18, 2001 Messages 56 Location US Sorry to do it in this forum, but I only know how to do this in Perl and thought maybe someone in here knows Perl and PHP... In perl you can force uppercase for the first letter of a string by using the \u command. Any idea how to accomplish this in php?
Sorry to do it in this forum, but I only know how to do this in Perl and thought maybe someone in here knows Perl and PHP... In perl you can force uppercase for the first letter of a string by using the \u command. Any idea how to accomplish this in php?
May 25, 2004 #2 PaulTEG Technical User Joined Sep 26, 2002 Messages 4,469 Location IE Ucase, ucfirst dunno --Paul Upvote 0 Downvote
May 26, 2004 #3 waiterm Programmer Joined May 17, 2004 Messages 236 Location GB ucfirst is right e.g. Code: $foo = 'hello world!'; $foo = ucfirst($foo); // Hello world! $bar = 'HELLO WORLD!'; $bar = ucfirst($bar); // HELLO WORLD! $bar = ucfirst(strtolower($bar)); // Hello world! take a look at PHP Conversion Utils there's all sorts of other string conversion tools there. Upvote 0 Downvote
ucfirst is right e.g. Code: $foo = 'hello world!'; $foo = ucfirst($foo); // Hello world! $bar = 'HELLO WORLD!'; $bar = ucfirst($bar); // HELLO WORLD! $bar = ucfirst(strtolower($bar)); // Hello world! take a look at PHP Conversion Utils there's all sorts of other string conversion tools there.