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

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

How to mention the localhost in android -

php - Calling a template part from a post -