Welcome Guest, Not a member yet? Register   Sign In
Retrieving template parser array index
#1

[eluser]pacifika[/eluser]
Hello, I'm using the template parser class with variable pairs to display database values. Now I'd like to add the array index to the view file so that result number one can be labeled as such. However both search and reference documentation come up empty. Is the only way to load the view file as normal and write a php loop? I prefer to keep using the template parse class currently. Thanks for any help.

I'm hoping to do something like (added index template tag):
Code:
<html>
<head>
<title>{blog_title}</title>
</head>
<body>

<h3>{blog_heading}</h3>

{blog_entries}
<h5>{index}:{title}</h5>
<p>{body}</p>
{/blog_entries}
&lt;/body&gt;
&lt;/html&gt;
#2

[eluser]pacifika[/eluser]
bump!




Theme © iAndrew 2016 - Forum software by © MyBB