title: palindrome words program in php
body: <p>there is a String 'S', program is to find and print whether this string is a palindrome or not. If yes, print "YES", else print "NO" </p>
  
  <p>for some palindrome words it is working like civic and for some it is not working
  code:-</p>
  
  <pre><code>&lt;?php
  $str = "Civic";
  
  $count =  ((strlen($str)+1 ) /2);
  $q = "y";
  for($i = 0; $i &lt; $count; $i++)
  {   
      $x = 1;
      $z = $str[(strlen($str-$x))];
      $x = $x+1;
      if($str[$i] == $z ) {
          $x = $x++;
          $q = "y";
      } else {
          $q = "n";  
      }
  }
  if($q == "n") {
      echo "No";
  } else {
      echo "Yes";
  }   
  ?&gt;
  </code></pre>
  
  <p>Please give me some suggestions about my code, Thanks</p>