Skip to content

Instantly share code, notes, and snippets.

@ringmaster
Created December 21, 2012 14:57
Show Gist options
  • Save ringmaster/4353289 to your computer and use it in GitHub Desktop.
Save ringmaster/4353289 to your computer and use it in GitHub Desktop.
In feed_functions.php
if($userSchools[0]){
$school_ids = array();
foreach($userSchools as $school) {
$school_ids[$school['school_id']] = $school['school_id'];
}
$school_ids = array_filter($school_ids);
if(count($school_ids) > 0) {
$schools = "school_id IN (";
$schools .= implode(',', $school_ids);
$schools .= ")";
if($userCourses[0]){
$schools = " OR ".$schools;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment