A slight problem with looping

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

A slight problem with looping

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

variable variables

I believe that's what you are looking for.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

variable variables...LOL. Exactly what I need. You're a saint. :-D
Post Reply