String compare demo: = : String Compare « String « PHP






String compare demo: =


 <?php
  $ilike = "Dance";
  if ($ilike = "Music"){
     echo "Do you like singing?";
  }elseif ($ilike = "Dance") {
     echo "Do you like dancing?";
  }else{
     echo "You like neither music nor dance";
  }
  ?>
           
       








Related examples in the same category

1.String compare: equal
2.strcasecmp: Binary safe case-insensitive string comparison
3.String compare with if statement
4.Compare string