Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. $civ_licenses = array();
  2. $civ_licenses = explode("],[", $row["civ_licenses"]);
  3. $civ_licenses = str_replace("]]\"","",$civ_licenses);
  4. $civ_licenses = str_replace("\"[[","",$civ_licenses);
  5. $civ_licenses = str_replace("`","",$civ_licenses);
  6. //CREATING OUTPUT
  7. for ( $x = 0; $x < count ($civ_licenses); $x++){
  8. //if($x%2 !== 0){
  9. // echo "<p>";
  10. //}
  11. if(strpos($civ_licenses[$x], "1")!==false){
  12. echo "<span class='label label-success' style='margin-right:3px; line-height:2;'>".substr($civ_licenses[$x],0,-2)."</span> ";
  13. }
  14. else{
  15. echo "<span class='label label-danger' style='margin-right:3px; line-height:2;'>".substr($civ_licenses[$x],0,-2)."</span> ";
  16. }
  17. //if($x%2 == 0){
  18. // echo "</p>";
  19. //}
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement