fetch
| From: | Ryan Sarver | Date: | Tue, 08 Apr 2003 04:07:55 +0000 |
| Subject: | fetch | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9184@lists.php.net to get a copy of this message | ||
I have a loop that gets the contents of an article, assigns the values,
fetches the HTML, and publishes it to a static file. Below is the basic
code. But when I run this loop, it only works for the first loop
Then $page
comes back blank. Any ideas?
$ids = $_POST['publishArray'];
for ( $i=0; $i < count($ids); $i++ )
{
$id = $ids[$i];
$result = $article->getArticleById($id);
$smarty->assign("article",$result);
$page = $smarty->fetch("articles.single.html");
$link =
publish($page,$result['short_name'],"articles",$result['pubDate']);
if (Base::isError($link))
{
// Fail
}
else
{
// Success
}
}
Thanks, Ryan