Skip to content

Instantly share code, notes, and snippets.

@dbu
dbu / gist:982774
Created May 20, 2011 11:45
last news
$de_index = 0;
$lastFrench = null;
foreach ($db->query('SELECT * from fluxcms_blogposts order by post_date desc') as $row) {
...
if ($row['post_lang'] == 'de') {
if ($lastFrench == null) {
$lastFrench = $de_index;
}
$de_index++;