Page 1 of 1

A slight problem with looping

Posted: Mon Sep 19, 2005 12:34 pm
by Charles256
okay..here is what I got so far.. I'm stuck on the idea..

Code: Select all

foreach ($_POST as $key=>$value)
	  {
	  	if ($name!='Register')
		{
			if ($value=='')
			{
I want to make a unique variable name based off of the variable key, i.e. $keye="the error message" but obviously if i type in $keye that would literally make it $keye i'd rather want to make the variable name the name of the key with e tacked onto the end and well... that's stumping my brain...I tried searching for some info but I can't find the words appearantly.

Posted: Mon Sep 19, 2005 12:45 pm
by feyd
variable variables

I believe that's what you are looking for.

Posted: Mon Sep 19, 2005 12:55 pm
by Charles256
variable variables...LOL. Exactly what I need. You're a saint. :-D