Created
April 15, 2018 00:45
-
-
Save nixonmedia/064fa8b8aa0e46240e385d9d27aac86c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$output = array(); | |
if(isset($med_sciences) && $med_sciences[0]=="Y"){ | |
array_push($output , 'Medical Sciences'); | |
} | |
if(isset($food_ag) && $food_ag[0]=="Y"){ | |
array_push($output , 'Food & Agriculture'); | |
} | |
if(isset($engineering) && $engineering[0]=="Y"){ | |
array_push($output , 'Engineering & Materials'); | |
} | |
if(isset($energy) && $energy[0]=="Y"){ | |
array_push($output , 'Energy & Environment'); | |
} | |
if(isset($it) && $it[0]=="Y"){ | |
array_push($output , 'IT & Ed Tech'); | |
} | |
echo '<span class="cat">'; | |
ob_start(); | |
foreach($output as $result) | |
{ | |
echo $result.', '; | |
} | |
$output = ob_get_clean(); | |
echo rtrim($output, ', '); | |
echo '</span>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment