1
Hi all,
i have this code:
$storyarray = NewsStory :: getAllPublished($xoopsModuleConfig['storycountadmin'], 0, false, 0, 1 );
echo "<select name="articles" style="width:300px">";
echo "<option value="" selected>Select story</option>";
foreach( $storyarray as $eachstory ) {
echo "<option value="" . XOOPS_URL . "/modules/news/article.php?storyid=". $eachstory -> storyid() ." ">" . $eachstory -> title() . "</option>";
}
echo "</select>";
which generates a dropdown with the last 10 published news.
The code works fine but i'm wondering how can write it in
a more elegant way using the xoops's built-in form elements.
Thanks in advance,ralf.