homer.favenir Posted July 25, 2008 Share Posted July 25, 2008 hi, can anyone please help me on how to make a string with asterisk as marker from uppercase to lowercase. $string1 = MC*GILL U-QUEBEC, CANADA '91 ; $string2 = U*C SAN FRANCISCO-C*A '94; $string3 = U *OF ILLINOIS-CHICAGO '71; //expected output of each variables McGill U-Quebec, Canada '91; UC San Francisco-CA '94; U of Illinois-Chicago '71; please thanks Link to comment https://forums.phpfreaks.com/topic/116528-uppercase-to-lowercase-vice-versa/ Share on other sites More sharing options...
effigy Posted July 25, 2008 Share Posted July 25, 2008 I don't see how the asterisks play a part and I don't think you can do this without setting up various contextual patterns, e.g., one that checks for state abbreviations. If you have Perl access, you can try Text::Autoformat. Link to comment https://forums.phpfreaks.com/topic/116528-uppercase-to-lowercase-vice-versa/#findComment-599500 Share on other sites More sharing options...
homer.favenir Posted July 26, 2008 Author Share Posted July 26, 2008 my string has asterisk on it, and that is the way i will receive the string. or maybe i can eliminate the asterisk and use regex uppercase function. this will make the string in normal upper-lower. is that right? thanks Link to comment https://forums.phpfreaks.com/topic/116528-uppercase-to-lowercase-vice-versa/#findComment-599878 Share on other sites More sharing options...
homer.favenir Posted July 26, 2008 Author Share Posted July 26, 2008 i have problem with uppercase $x = '23ABARQUEZ-AGCAOILI, CARMENCITA IM CCM PUD U *OF *THE EAST-PHILIPPINES \'80'; echo ucfirst(strtolower($x)); it returns to lower still. it didnt change to uppercase first. please advice. thanks Link to comment https://forums.phpfreaks.com/topic/116528-uppercase-to-lowercase-vice-versa/#findComment-599893 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.