I'm having trouble with a loop:
This is what I currently have:
<CFIF IsDefined('qry1')>
<CFLOOP QUERY = "qry1">
<CFHTMLHEAD TEXT = "
<META NAME = 'description' CONTENT = '#qry1.content#'>
<META NAME = 'keywords' CONTENT = '#qry1.content#,'>
">
</CFLOOP>
</CFIF>
[/red]
and of course, the output looks something like this:
<META NAME = 'description' CONTENT = 'content_1'>
<META NAME = 'keywords' CONTENT = 'content_1'>
<META NAME = 'description' CONTENT = 'content_2'>
<META NAME = 'keywords' CONTENT = 'content_2'>
.
.
.
<META NAME = 'description' CONTENT = 'content_n'>
<META NAME = 'keywords' CONTENT = 'content_n'>
[/red]
But the output I am looking for is as follows:
<META NAME = 'description' CONTENT='content1, content_2, ..., content_n'>
<META NAME = 'keywords' CONTENT='content1,content_2, ..., content_n'>
[/red]
The answer I know must be simple, but I can't seem to grasp it. Somehow, I can't figure out how to get the loop within the CONTENT part of the code.