Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2005, 06:55 PM
Authorized User
 
Join Date: Dec 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Raising the case of a string

I'm looking for a PHP function that raises the case of alpha characters in a string.

For example:

$string = "1abcdefg9";
echo raisecase($string);

1ABCDEFG9

Does this exist in PHP?

Thanks!


 
Old March 18th, 2005, 10:54 PM
Authorized User
 
Join Date: Jan 2005
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this:

$string ="1abcdefg9";
$up_string = strtoupper($string);
echo $up_string;

that should work

----------------
Never bother to learn something not knowing which does not do you any harm, and never neglect to learn something whose negligence will increase your ignorance - Imam Jafar Sadeq
 
Old March 19th, 2005, 06:51 AM
Authorized User
 
Join Date: Dec 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just what I was looking for. Thanks!

 
Old April 15th, 2005, 02:08 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

If we want a hump-notation ( plus! alpha-numeric ) string e.g., 'BbnMiLoRc' or 'Ad3RLi4xO' ?
This is quite good for auto-geenrated passwords :D






Similar Threads
Thread Thread Starter Forum Replies Last Post
Raising COM Events in C# Class Library sreecareer ASP.NET 2.0 Basics 0 September 21st, 2008 08:50 PM
Case help michael.boucher SQL Server 2005 0 May 23rd, 2008 01:45 AM
Chapter4 - Raising Event KellyR Access VBA 0 June 11th, 2007 08:50 PM
search string either Upper case or lower case rylemer Beginning VB 6 3 March 24th, 2004 04:23 PM
Check Case in a Case-Insensitive DB nbryson SQL Language 1 January 23rd, 2004 07:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.