Jump to content

Undefined Constant/Index


ParaChase

Recommended Posts

Hello everybody,

 

I realize that there have been several threads on this already, but I am still wondering about receiving undefined constants/indexes. In the other examples that I have seen, it involved adding quotation marks. However, I don't think that my code has that problem:

<?php
		echo("<pre>");
		$d = null;
		$offset = -4;
		echo("MARCH <br/>");
		echo("  S  M  T  W  H  F  S <br/>");

		for ($row=0; $row<=4; $row++) {
			for ($col=0; $col<7; $col++) {
				$d = $col + $row*7 + 1 + $offset;
				if ($d<10) {
					echo(" ");
				}
				echo(" ");
				if ($d<32 && $d>0) {
				echo(d);
				}
				if ($d<1)
					echo(" ");
			}
			echo("<br/>");
		}

		echo("</pre>");

?>

 

This is code that I'm using to make a calendar. I'm not asking for code. I just want some help on why this undefined constant happens and what I can do to get rid of it.

 

Thank you so much.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.