Page 3 of 3

Re: Arrays, text areas and concatenation

Posted: Thu Dec 16, 2010 1:51 pm
by Flashart
Hi yes I noticed that almost soon after i posted!

I have changed it so it reads

Code: Select all

if(isset($_POST['exact_match']));
		{	
			foreach ($kword1Array as $key => $value)
				{
				
			echo '['.$value.']<br />';
			}
			}
and that array is here:

Code: Select all

if (isset($_POST['submit'])){

	$firstKwordarea = $_POST['kword_area_1'];
    $secondKwordarea = $_POST['kword_area_2'];
    $thirdKwordarea = $_POST['kword_area_3'];
    $fourthKwordarea = $_POST['kword_area_4'];
    $pre_multiplier = $_POST['pre_multiplier_area'];
      
    //Arrays
    $kword1Array = explode("\n", $firstKwordarea);
    $kword2Array = explode("\n", $secondKwordarea);
    $kword3Array = explode("\n", $thirdKwordarea);
    $kword4Array = explode("\n", $fourthKwordarea);
    $pre_multiplier_Array = explode("\n", $pre_Multiplier_area);
    }
Yet i still get the error message. Clearly I have not understood something but I don't know what to change in order to correct it?

Re: Arrays, text areas and concatenation

Posted: Fri Dec 17, 2010 8:24 am
by Flashart
ah...

spotted the extraneous ;

Code: Select all

if(isset($_POST['exact_match']))
                {       
                        foreach ($kword1Array as $key => $value)
                                {
                                
                        echo '['.$value.']<br />';
                        }
                        }
which has got rid of the error, but I still don't get any output at all?

Re: Arrays, text areas and concatenation

Posted: Wed Jan 05, 2011 6:16 am
by Flashart
I still am a bit stuck on this. Any help would be greatly appreciated. Thanks!