RE: Manipulating text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



str_replace

$var = "play-time";

$var = str_replace("play-","",$var);

regex

$var = eregi_replace("[play-]","",$var);

B


From: "Ron Piggott (PHP)" <ron.php@xxxxxxxxxxxxxxxxxx>
Reply-To: ron.php@xxxxxxxxxxxxxxxxxx
To: PHP DB <php-db@xxxxxxxxxxxxx>
Subject:  Manipulating text
Date: Thu, 08 Dec 2005 21:25:39 -0500

If I have

$variable = "play_time";

how may I remove "play_" from $variable and just have $variable equal to
"time"?

Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux