Problem with Echoing a string
Posted: Wed Mar 18, 2009 12:05 pm
Hi there
Im trying to print out something but im having errors with it
What I have is this
for ($x = 1; $x <= $fields; $x++)
{
echo "Required = {$_POST['required".$x."']}<br />";
}
It just prints out " Required = "
But when I print out
echo "Required = {$_POST['required1']}<br />";
It prints out what I want to print "Required = on"
It seems im making some basic error with the insertion of the $x variable but I cant figure it out
Can anyone help a brother?
Im trying to print out something but im having errors with it
What I have is this
for ($x = 1; $x <= $fields; $x++)
{
echo "Required = {$_POST['required".$x."']}<br />";
}
It just prints out " Required = "
But when I print out
echo "Required = {$_POST['required1']}<br />";
It prints out what I want to print "Required = on"
It seems im making some basic error with the insertion of the $x variable but I cant figure it out
Can anyone help a brother?