clickable $row array elements
Posted: Mon Jul 16, 2007 10:38 am
Hi
I want the titles of the listed articles clickable using this code:
and get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in g:\programs\easyphp1-8\www\takfekr\htdocs\home.php on line 13
I want the titles of the listed articles clickable using this code:
Code: Select all
<?php
include'global.php';
$result=mysql_query("SELECT * FROM articles ORDER BY id DESC LIMIT 20");
?>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p align=right>
<?
while( $row=mysql_fetch_array($result)) {
$id=$row['id'];
echo "<a href=\"readarticle.php?id=$id\">$row['title']</a>" ,' ', 'نوشته',' ', $row['name'] , "<br />";
}
?>Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in g:\programs\easyphp1-8\www\takfekr\htdocs\home.php on line 13