Jump to content

uppercase to lowercase vice versa


homer.favenir

how can i make my string "MC*GILL U-QUEBEC, CANADA '91" to "McGILL U-QUEBEC, CANADA '91"  

1 member has voted

  1. 1. how can i make my string "MC*GILL U-QUEBEC, CANADA '91" to "McGILL U-QUEBEC, CANADA '91"

    • regex
      1
    • UC, LC
      0


Recommended Posts

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

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

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.