Skip to content

Instantly share code, notes, and snippets.

@fhferreira
Created January 14, 2014 16:18
Show Gist options
  • Save fhferreira/8420933 to your computer and use it in GitHub Desktop.
Save fhferreira/8420933 to your computer and use it in GitHub Desktop.
<?php
function palindromes($words) {
$str = "";
// Write your code here
foreach($words as $word){
if( $word == strrev($word) ){
$str .= 'T';
}else{
$str .= 'F';
}
}
return $str;
// To print results to the standard output you can use print
// Example:
// print "Hello world!";
}
// Do NOT call the palindromes function in the code
// you write. The system will call it automatically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment