Skip to content

Instantly share code, notes, and snippets.

@sinkovsky
Created October 9, 2009 21:41
Show Gist options
  • Save sinkovsky/206383 to your computer and use it in GitHub Desktop.
Save sinkovsky/206383 to your computer and use it in GitHub Desktop.
for ( $i = 0; $i < count($verticals); $i++ )
{
$news_category_id = $verticals[$i]['vertical_news_category_id'];
$blog_category_id = $verticals[$i]['vertical_blog_category_id'];
$wires_category_id = $verticals[$i]['vertical_wires_category_id'];
if ( isset($placement[$blog_category_id]) ) {
$placement_category_id = $blog_category_id;
} elseif ( isset($placement[$news_category_id]) ) {
$placement_category_id = $news_category_id;
} elseif ( isset($placement[$wires_category_id]) ) {
$placement_category_id = $wires_category_id;
}
var_dump($placement_category_id);
echo "<br><br><br>";
if ( !empty($placement_category_id) ) {
$verticals[$i]['placement'] = ! empty($placement[$placement_category_id]['placement_is_primary']) ? 'primary' : 'secondary';
}
else
{
$verticals[$i]['placement'] = 'none';
} // else
} // for
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment