I am trying to return a list of projects which I can do via the following code: (this is part of a larger if statement, that is why the dangling { bracket in the foreach line)
foreach ($r->getRecords() as $project){
echo $project->getField('Project_Name') .'<br />';
That returns the list just as it should. I am now trying to link each of the returned $project variable to a URL (each project will re-direct to another page showing project details.) Here is what I have tried.
foreach ($r->getRecords() as $project){
echo '<a href="project_detail.php">' $project->getField('Project_Name') '</a>' .'<br />';
That returned a syntax error on the
foreach ($r->getRecords() as $project){
echo $project->getField("<a href='project_detail.php'>'Project_Name'</a>") .'<br />';
Any advice or a nudge in the right direction would be appreciated.