I know the title sounds like an easy thing to do. But its not. I want to check that my user's message has 2 -'s in it. Then replace the first - with <s> then the second one with </s> and i dont know how to check for to dashe's but this is what i have to change it
<?php
$ID = $_COOKIE['idCookie'];
$memberid = $_GET['id'];
$query = mysql_query("SELECT * FROM `private_messages` WHERE to_id='$ID' AND To_Deleted='0' AND from_id='$memberid' OR to_id='$memberid' AND from_id='$ID'");
while($row = mysql_fetch_assoc($query)){
$subject = $row['subject'];
$toid = $row['to_id'];
$read = $row['opened'];
$fromid = $row['from_id'];
$message = $row['message'];
$message = str_replace($smile_symble, $smile_pic, $message);
$strike = array("-","-"); //probably dont need 2 do i?
$strike1 = array("<s>","</s>");
$message = str_replace($strike, $strike1, $message)
?>