I've some code here and I don't understand how to make this work:
$query = "SELECT * FROM `blog-posts` ORDER BY `date` DESC LIMIT 0, 10 WHERE `tags` LIKE '%test%'";
$result = mysql_query($query);
while($posts = mysql_fetch_array($result)) {
echo $posts["title"] . "<br>";
echo $posts["text"] . "<br>";
$mydate = strtotime($posts["date"]);
echo date('j M', $mydate) . "<br>";
echo $posts["tags"] . "<br>";
}
echo "<a style=\"float:right;\" href=\"logout.php?action=logout\">Log out</a>";
Can somebody help me plz. Grts.