I have created a loop which will display date 2004 to 2014 in a formatted way. But the problem is, it is showing 204 instead of 2004 and continue this till 209.. So, how to show
According to your code, you can try this. Though its not a standard way:
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Feb 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Mar 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Apr 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax May 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Jun 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Jul 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Aug 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Sep 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Oct 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Nov 200$yar
";
$ax++;
}
$ax = 1;
while ($ax <= 31) {
echo "$ax Dec 200$yar
";
$ax++;
}
$yar++;
}
$yr = 10;
while ($yr <= 14) {
$x = 1;
while ($x <= 31) {
echo "$x Jan 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Feb 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Mar 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Apr 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x May 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Jun 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Jul 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Aug 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Sep 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Oct 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Nov 20$yr
";
$x++;
}
$x = 1;
while ($x <= 31) {
echo "$x Dec 20$yr
";
$x++;
}
$yr++;
}
?>