Project Euler Solutions by Ross Marks

<?php
/*****************************
 * ProjectEuler - Problem 36
 * By Ross Marks
 *****************************
 * The decimal number, 585 = 10010010012 (binary), is palindromic in both bases.
 * 
 * Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
 * 
 * (Please note that the palindromic number, in either base, may not include leading zeros.)
 ****************************/
 
include('_functions.php');

$awns 0;

for(
$a 1$a <= 1000000$a++){
    if((string)
$a == strrev((string)$a)){
        
$binary decbin($a);
        if((string)
$binary == strrev((string)$binary)){
            
$awns += $a;
        }
    }
}

echo 
"Answer: $awns";


?>