Forum Moderators: coopster

Message Too Old, No Replies

how to replace everything after a hyphen symbol

         

lindajames

2:51 am on Dec 3, 2004 (gmt 0)

10+ Year Member



hi, i have the following code

<?
echo $content;
?>

The above code produces outputs in the following format:

121212-Description

Can anyone tell me how i can use a replace function to replace everything after the "-" sign with a ":" sign

thank you

coopster

3:16 am on Dec 3, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



everything?
$content = '121212-Description'; 
$content = substr_replace [php.net]($content, ':', strpos [php.net]($content, '-'));