title: Php Program to find Palindrome?
body: <p>Three steps to find the palindrome?</p>
  
  <ol>
  <li><p>use <code>strrev</code> on the given value</p></li>
  <li><p>Then split using the <code>str_split</code>.</p></li>
  <li><p>Then use <code>foreach</code> and <code>concate</code> the split value.</p></li>
  </ol>
  
  <p>Example</p>
  
  <pre><code>$a = "madam";
  
  $b =  strrev($a);
  
      $string_reverse = str_split($b);
  
      $palin = '';
  
      foreach($string_reverse as $value){
  
          $palin.= $value; 
      }
  
      print $palin;
  
      if($a == $palin){
  
          print "&lt;br&gt;Palindrome";
  
      } else {
  
          print "&lt;br&gt;Not Palindrome"; 
  
      }
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <blockquote>
    <p>madam<br>
    Palindrome</p>
  </blockquote>