Well I tried this
$vendor[$x] = $_POST["vendor$x"];
$vendorsplit = explode ("\n",$vendor[1]);
setcookie("vendorname$x",$vendorplit[0]);
Just to clear it up, there is obviously a loop in both of these instances, but for simplicity sake I just tried to explode the first varriable. Please note that I am currently getting the value of $_POST["vendor$x"] and putting it into a cookie called vendor$x. In the above code, the program does run through the loop, and gets the POST values correctly. However, when I try exploding vendor[1] (which contains the name, address, etc of the first vendor) and then setting the cookie vendorname$x as the first value in the array, the cookie is not set.
Any ideas?