<?php
$input = 21;
if ($input % 2 === 0) die("Input must be an odd number");
for ($i = 0; $i < $input; $i++) {
for ($j = 0; $j < $input; $j++) {
echo (($j == $i) || ($j == $input-$i-1)) ? '*' : ' ';
}
echo "\n";
}
PD9waHAKCiRpbnB1dCA9IDIxOwppZiAoJGlucHV0ICUgMiA9PT0gMCkgZGllKCJJbnB1dCBtdXN0IGJlIGFuIG9kZCBudW1iZXIiKTsKCmZvciAoJGkgPSAwOyAkaSA8ICRpbnB1dDsgJGkrKykgewoJZm9yICgkaiA9IDA7ICRqIDwgJGlucHV0OyAkaisrKQl7CgkJZWNobyAoKCRqID09ICRpKSB8fCAoJGogPT0gJGlucHV0LSRpLTEpKSA/ICcqJyA6ICcgJzsKCX0KCWVjaG8gIlxuIjsKfQ==