php - Trim string after and before a character -


i want trim string after "=" , before ";"

com=8af14f8b9d5be16e807ab9e0ed1d7edb:b6668c681f9d3bd2ad4ae31a8b6c7f2859939a75; 

so echoes 8af14f8b9d5be16e807ab9e0ed1d7edb:b6668c681f9d3bd2ad4ae31a8b6c7f2859939a75

you can use str_replace function replace multiple values by, in case, nothing:

str_replace(array('com=', ';'), '', $string); 

Comments