Forum Moderators: open
$sql="select * from table where num='5'";
$result = mysql_query($sql, $dblink) or die("System down");
while ($newArray = mysql_fetch_array($result)){
$num = $newArray['num'];
$title = $newArray['title'];
$story = $newArray['story'];
{
str_replace('hello', 'hi', '$story');
}
$name = $newArray['name'];
}
print "$title, $story, $name";
$story is a sentence stored as TEXT in the database, am I going in the right direction? Still new to php but enjoying it, the above just prints as normal without changing the words.
Be gentle ;)