Zado
asked on
Display part of string
Hi,
I've got a string like so:
$str = "2008T(12)-1234P(13)-111T( 12)-908P(4 5)-11T(11) ";
I need to if chosen part exists, let's say
$part = "1234P";
and display it with number in brackets if exists, so
$final = "1234P(13)" in this case.
otherwise display "echo $part.' does not exists';".
Any ideas?
Thanks for any help.
I've got a string like so:
$str = "2008T(12)-1234P(13)-111T(
I need to if chosen part exists, let's say
$part = "1234P";
and display it with number in brackets if exists, so
$final = "1234P(13)" in this case.
otherwise display "echo $part.' does not exists';".
Any ideas?
Thanks for any help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent, thanks.
ASKER