<?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";
}