Jump to content

[SOLVED] switching from foreach to for, error???


Recommended Posts

/*comment code temporarely
foreach($_POST['name'] as $value)
	echo $value;
$name = $_POST['name'];
$email = $_POST['email'];
$website = $_POST['website'];
for($posion = 0; $position < count($name); $position ++)
	echo $name[$position] . " : - : " . $email[$position] . " : - : " .$website[$position] ."\n";


when I use for each everything works and I get output, the problem, it works only with one variable. Since I have to work with 3 variables arrays I have switched to for look, but I get no output???

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.

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.