//oldWord command
$oldWord = array('good');
foreach ($oldWord as $key => $value)
{
$sql = "select * from `words` where `name` = '" . $value . "'";
$res = mysql_query($sql);
while ($row = mysql_fetch_assoc($res)) {
echo $row["SYNONYM1"];
}
}
This code works form me but I am having problems with the echo data. This code replace two words that it match in my database. It will change good and green with great and blue. When I echo out my database results it echo
greatblue
and I need it to echo out
great blue
What do I need to do to correct this
$oldWord = array('good');
foreach ($oldWord as $key => $value)
{
$sql = "select * from `words` where `name` = '" . $value . "'";
$res = mysql_query($sql);
while ($row = mysql_fetch_assoc($res)) {
echo $row["SYNONYM1"];
}
}
This code works form me but I am having problems with the echo data. This code replace two words that it match in my database. It will change good and green with great and blue. When I echo out my database results it echo
greatblue
and I need it to echo out
great blue
What do I need to do to correct this