Jump to content

I have an array containing arrays, how do I make it all one array?


jamesxg1

Recommended Posts

Hiya peeps!

 

I have this. It's extremely large, and will be diffrent everytime but this is the usual size of what the script will be handling.

 

(See uploaded script, text too large, plus I had to delete some of the array as the file was too large).

 

I was wondering how I would make this all one array and not loads.

 

Many thanks

 

James.

 

[attachment deleted by admin]

Link to comment
Share on other sites

I am sorry I meant to give you the array_merge function not the array_combine

 

http://php.net/manual/en/function.array-merge.php

 

I am working on a little something now

 

Nice! Cheers mate, I had a look and that look's like the way to go, only problem I got is I cant for love nor money get it to work, do you want me to post my script ?

 

Many thanks

 

James.

Link to comment
Share on other sites

Yeah post your script and I shall take a look =)

 

Ok, here it is bud :), cheers mate.

 

<?php
  $data = array();

  function add_person($Company_Name, $Address_1, $Address_2, $Locality, $Town, $County, $Postcode, $Region, $Phone_no, $Fax_no, $No_of_Employees, $Years_Established, $Premise_Type, $Type_of_Business, $SIC_Code, $SIC_Description, $Turnover, $Est_Turnover, $Financial_Year_End, $Profit_Before_Tax, $Net_Worth, $Exports, $status, $notes, $Thomson_Verified_Contact_Title, $Thomson_Verified_Contact_Forename, $Thomson_Verified_Contact_Surname, $Thomson_Verified_Contact_Position, $Companies_House_Directors_Title_1, $Companies_House_Directors_Forename_1, $Companies_House_Directors_Surname_1, $Companies_House_Directors_Position_1, $Companies_House_Directors_Title_2, $Companies_House_Directors_Forename_2, $Companies_House_Directors_Surname_2, $Companies_House_Directors_Position_2, $Companies_House_Directors_Title_3, $Companies_House_Directors_Forename_3, $Companies_House_Directors_Surname_3, $Companies_House_Directors_Position_3, $Companies_House_Directors_Title_4, $Companies_House_Directors_Forename_4, $Companies_House_Directors_Surname_4, $Companies_House_Directors_Position_4, $Companies_House_Directors_Title_5, $Companies_House_Directors_Forename_5, $Companies_House_Directors_Surname_5, $Companies_House_Directors_Position_5, $Companies_House_Directors_Title_6, $Companies_House_Directors_Forename_6, $Companies_House_Directors_Surname_6, $Companies_House_Directors_Position_6, $Companies_House_Directors_Title_7, $Companies_House_Directors_Forename_7, $Companies_House_Directors_Surname_7, $Companies_House_Directors_Position_7, $Companies_House_Directors_Title_8, $Companies_House_Directors_Forename_8, $Companies_House_Directors_Surname_8, $Companies_House_Directors_Position_8, $Companies_House_Directors_Title_9, $Companies_House_Directors_Forename_9, $Companies_House_Directors_Surname_9, $Companies_House_Directors_Position_9, $Companies_House_Directors_Title_10, $Companies_House_Directors_Forename_10, $Companies_House_Directors_Surname_10, $Companies_House_Directors_Position_10, $Companies_House_Directors_Title_11, $Companies_House_Directors_Forename_11, $Companies_House_Directors_Surname_11, $Companies_House_Directors_Position_11, $Companies_House_Directors_Title_12, $Companies_House_Directors_Forename_12, $Companies_House_Directors_Surname_12, $Companies_House_Directors_Position_12, $Companies_House_Directors_Title_13, $Companies_House_Directors_Forename_13, $Companies_House_Directors_Surname_13, $Companies_House_Directors_Position_13, $Companies_House_Directors_Title_14, $Companies_House_Directors_Forename_14, $Companies_House_Directors_Surname_14, $Companies_House_Directors_Position_14, $Companies_House_Directors_Title_15, $Companies_House_Directors_Forename_15, $Companies_House_Directors_Surname_15, $Companies_House_Directors_Position_15, $Companies_House_Directors_Title_16, $Companies_House_Directors_Forename_16, $Companies_House_Directors_Surname_16, $Companies_House_Directors_Position_16, $Companies_House_Directors_Title_17, $Companies_House_Directors_Forename_17, $Companies_House_Directors_Surname_17, $Companies_House_Directors_Position_17, $Companies_House_Directors_Title_18, $Companies_House_Directors_Forename_18, $Companies_House_Directors_Surname_18, $Companies_House_Directors_Position_18, $Companies_House_Directors_Title_19, $Companies_House_Directors_Forename_19, $Companies_House_Directors_Surname_19, $Companies_House_Directors_Position_19, $Companies_House_Directors_Title_20, $Companies_House_Directors_Forename_20, $Companies_House_Directors_Surname_20, $Companies_House_Directors_Position_20, $Record_ID_Number) {
  global $data;
  
  $data[] = array('Company_Name' => $Company_Name, 'Address_1' => $Address_1, 'Address_2' => $Address_2, 'Locality' => $Locality, 'Town' => $Town, 'County' => $County, 'Postcode' => $Postcode, 'Region' => $Region, 'Phone_no' => $Phone_no, 'Fax_no' => $Fax_no, 'No_of_Employees' => $No_of_Employees, 'Years_Established' => $Years_Established, 'Premise_Type' => $Premise_Type, 'Type_of_Business' => $Type_of_Business, 'SIC_Code' => $SIC_Code, 'SIC_Description' => $SIC_Description, 'Turnover' => $Turnover, 'Est_Turnover' => $Est_Turnover, 'Financial_Year_End' => $Financial_Year_End, 'Profit_Before_Tax' => $Profit_Before_Tax, 'Net_Worth' => $Net_Worth, 'Exports' => $Exports, 'status' => $status, 'notes' => $notes, 'Thomson_Verified_Contact_Title' => $Thomson_Verified_Contact_Title, 'Thomson_Verified_Contact_Forename' => $Thomson_Verified_Contact_Forename, 'Thomson_Verified_Contact_Surname' => $Thomson_Verified_Contact_Surname, 'Thomson_Verified_Contact_Position' => $Thomson_Verified_Contact_Position, 'Companies_House_Directors_Title_1' => $Companies_House_Directors_Title_1, 'Companies_House_Directors_Forename_1' => $Companies_House_Directors_Forename_1, 'Companies_House_Directors_Surname_1' => $Companies_House_Directors_Surname_1, 'Companies_House_Directors_Position_1' => $Companies_House_Directors_Position_1, 'Companies_House_Directors_Title_2' => $Companies_House_Directors_Title_2, 'Companies_House_Directors_Forename_2' => $Companies_House_Directors_Forename_2, 'Companies_House_Directors_Surname_2' => $Companies_House_Directors_Surname_2, 'Companies_House_Directors_Position_2' => $Companies_House_Directors_Position_2, 'Companies_House_Directors_Title_3' => $Companies_House_Directors_Title_3, 'Companies_House_Directors_Forename_3' => $Companies_House_Directors_Forename_3, 'Companies_House_Directors_Surname_3' => $Companies_House_Directors_Surname_3, 'Companies_House_Directors_Position_3' => $Companies_House_Directors_Position_3, 'Companies_House_Directors_Title_4' => $Companies_House_Directors_Title_4, 'Companies_House_Directors_Forename_4' => $Companies_House_Directors_Forename_4, 'Companies_House_Directors_Surname_4' => $Companies_House_Directors_Surname_4, 'Companies_House_Directors_Position_4' => $Companies_House_Directors_Position_4, 'Companies_House_Directors_Title_5' => $Companies_House_Directors_Title_5, 'Companies_House_Directors_Forename_5' => $Companies_House_Directors_Forename_5, 'Companies_House_Directors_Surname_5' => $Companies_House_Directors_Surname_5, 'Companies_House_Directors_Position_5' => $Companies_House_Directors_Position_5, 'Companies_House_Directors_Title_6' => $Companies_House_Directors_Title_6, 'Companies_House_Directors_Forename_6' => $Companies_House_Directors_Forename_6, 'Companies_House_Directors_Surname_6' => $Companies_House_Directors_Surname_6, 'Companies_House_Directors_Position_6' => $Companies_House_Directors_Position_6, 'Companies_House_Directors_Title_7' => $Companies_House_Directors_Title_7, 'Companies_House_Directors_Forename_7' => $Companies_House_Directors_Forename_7, 'Companies_House_Directors_Surname_7' => $Companies_House_Directors_Surname_7, 'Companies_House_Directors_Position_7' => $Companies_House_Directors_Position_7, 'Companies_House_Directors_Title_8' => $Companies_House_Directors_Title_8, 'Companies_House_Directors_Forename_8' => $Companies_House_Directors_Forename_8, 'Companies_House_Directors_Surname_8' => $Companies_House_Directors_Surname_8, 'Companies_House_Directors_Position_8' => $Companies_House_Directors_Position_8, 'Companies_House_Directors_Title_9' => $Companies_House_Directors_Title_9, 'Companies_House_Directors_Forename_9' => $Companies_House_Directors_Forename_9, 'Companies_House_Directors_Surname_9' => $Companies_House_Directors_Surname_9, 'Companies_House_Directors_Position_9' => $Companies_House_Directors_Position_9, 'Companies_House_Directors_Title_10' => $Companies_House_Directors_Title_10, 'Companies_House_Directors_Forename_10' => $Companies_House_Directors_Forename_10, 'Companies_House_Directors_Surname_10' => $Companies_House_Directors_Surname_10, 'Companies_House_Directors_Position_10' => $Companies_House_Directors_Position_10, 'Companies_House_Directors_Title_11' => $Companies_House_Directors_Title_11, 'Companies_House_Directors_Forename_11' => $Companies_House_Directors_Forename_11, 'Companies_House_Directors_Surname_11' => $Companies_House_Directors_Surname_11, 'Companies_House_Directors_Position_11' => $Companies_House_Directors_Position_11, 'Companies_House_Directors_Title_12' => $Companies_House_Directors_Title_12, 'Companies_House_Directors_Forename_12' => $Companies_House_Directors_Forename_12, 'Companies_House_Directors_Surname_12' => $Companies_House_Directors_Surname_12, 'Companies_House_Directors_Position_12' => $Companies_House_Directors_Position_12, 'Companies_House_Directors_Title_13' => $Companies_House_Directors_Title_13, 'Companies_House_Directors_Forename_13' => $Companies_House_Directors_Forename_13, 'Companies_House_Directors_Surname_13' => $Companies_House_Directors_Surname_13, 'Companies_House_Directors_Position_13' => $Companies_House_Directors_Position_13, 'Companies_House_Directors_Title_14' => $Companies_House_Directors_Title_14, 'Companies_House_Directors_Forename_14' => $Companies_House_Directors_Forename_14, 'Companies_House_Directors_Surname_14' => $Companies_House_Directors_Surname_14, 'Companies_House_Directors_Position_14' => $Companies_House_Directors_Position_14, 'Companies_House_Directors_Title_15' => $Companies_House_Directors_Title_15, 'Companies_House_Directors_Forename_15' => $Companies_House_Directors_Forename_15, 'Companies_House_Directors_Surname_15' => $Companies_House_Directors_Surname_15, 'Companies_House_Directors_Position_15' => $Companies_House_Directors_Position_15, 'Companies_House_Directors_Title_16' => $Companies_House_Directors_Title_16, 'Companies_House_Directors_Forename_16' => $Companies_House_Directors_Forename_16, 'Companies_House_Directors_Surname_16' => $Companies_House_Directors_Surname_16, 'Companies_House_Directors_Position_16' => $Companies_House_Directors_Position_16, 'Companies_House_Directors_Title_17' => $Companies_House_Directors_Title_17, 'Companies_House_Directors_Forename_17' => $Companies_House_Directors_Forename_17, 'Companies_House_Directors_Surname_17' => $Companies_House_Directors_Surname_17, 'Companies_House_Directors_Position_17' => $Companies_House_Directors_Position_17, 'Companies_House_Directors_Title_18' => $Companies_House_Directors_Title_18, 'Companies_House_Directors_Forename_18' => $Companies_House_Directors_Forename_18, 'Companies_House_Directors_Surname_18' => $Companies_House_Directors_Surname_18, 'Companies_House_Directors_Position_18' => $Companies_House_Directors_Position_18, 'Companies_House_Directors_Title_19' => $Companies_House_Directors_Title_19, 'Companies_House_Directors_Forename_19' => $Companies_House_Directors_Forename_19, 'Companies_House_Directors_Surname_19' => $Companies_House_Directors_Surname_19, 'Companies_House_Directors_Position_19' => $Companies_House_Directors_Position_19, 'Companies_House_Directors_Title_20' => $Companies_House_Directors_Title_20, 'Companies_House_Directors_Forename_20' => $Companies_House_Directors_Forename_20, 'Companies_House_Directors_Surname_20' => $Companies_House_Directors_Surname_20, 'Companies_House_Directors_Position_20' => $Companies_House_Directors_Position_20, 'Record_ID_Number' => $Record_ID_Number);
  }

  if($_FILES['file']['tmp_name']):
  
  $dom = DOMDocument::load($_FILES['file']['tmp_name']);
  $rows = $dom->getElementsByTagName('Row');
  $first_row = true;
  foreach($rows as $row):
  
  if(!$first_row):
  $first = "";
  $middle = "";
  $last = "";
  $email = "";

  $index = 1;
  $cells = $row->getElementsByTagName('Cell');
  
  foreach($cells as $cell):
  $ind = $cell->getAttribute( 'ss:Index' );
  
  if($ind != null) $index = $ind;
if($index == 1) $Company_Name = $cell->nodeValue;
if($index == 2) $Address_1 = $cell->nodeValue;
if($index == 3) $Address_2 = $cell->nodeValue;
if($index == 4) $Locality = $cell->nodeValue;
if($index == 5) $Town = $cell->nodeValue;
if($index == 6) $County = $cell->nodeValue;
if($index == 7) $Postcode = $cell->nodeValue;
if($index ==  $Region = $cell->nodeValue;
if($index == 9) $Phone_no = $cell->nodeValue;
if($index == 10) $Fax_no = $cell->nodeValue;
if($index == 11) $No_of_Employees = $cell->nodeValue;
if($index == 12) $Years_Established = $cell->nodeValue;
if($index == 13) $Premise_Type = $cell->nodeValue;
if($index == 14) $Type_of_Business = $cell->nodeValue;
if($index == 15) $SIC_Code = $cell->nodeValue;
if($index == 16) $SIC_Description = $cell->nodeValue;
if($index == 17) $Turnover_ = $cell->nodeValue;
if($index == 18) $Est_Turnover = $cell->nodeValue;
if($index == 19) $Financial_Year_End = $cell->nodeValue;
if($index == 20) $Profit_Before_Tax_ = $cell->nodeValue;
if($index == 21) $Net_Worth_ = $cell->nodeValue;
if($index == 22) $Exports_ = $cell->nodeValue;
if($index == 23) $status = $cell->nodeValue;
if($index == 24) $notes = $cell->nodeValue;
if($index == 25) $Thomson_Verified_Contact_Title = $cell->nodeValue;
if($index == 26) $Thomson_Verified_Contact_Forename = $cell->nodeValue;
if($index == 27) $Thomson_Verified_Contact_Surname = $cell->nodeValue;
if($index == 28) $Thomson_Verified_Contact_Position = $cell->nodeValue;
if($index == 29) $Companies_House_Directors_Title_1 = $cell->nodeValue;
if($index == 30) $Companies_House_Directors_Forename_1 = $cell->nodeValue;
if($index == 31) $Companies_House_Directors_Surname_1 = $cell->nodeValue;
if($index == 32) $Companies_House_Directors_Position_1 = $cell->nodeValue;
if($index == 33) $Companies_House_Directors_Title_2 = $cell->nodeValue;
if($index == 34) $Companies_House_Directors_Forename_2 = $cell->nodeValue;
if($index == 35) $Companies_House_Directors_Surname_2 = $cell->nodeValue;
if($index == 36) $Companies_House_Directors_Position_2 = $cell->nodeValue;
if($index == 37) $Companies_House_Directors_Title_3 = $cell->nodeValue;
if($index == 38) $Companies_House_Directors_Forename_3 = $cell->nodeValue;
if($index == 39) $Companies_House_Directors_Surname_3 = $cell->nodeValue;
if($index == 40) $Companies_House_Directors_Position_3 = $cell->nodeValue;
if($index == 41) $Companies_House_Directors_Title_4 = $cell->nodeValue;
if($index == 42) $Companies_House_Directors_Forename_4 = $cell->nodeValue;
if($index == 43) $Companies_House_Directors_Surname_4 = $cell->nodeValue;
if($index == 44) $Companies_House_Directors_Position_4 = $cell->nodeValue;
if($index == 45) $Companies_House_Directors_Title_5 = $cell->nodeValue;
if($index == 46) $Companies_House_Directors_Forename_5 = $cell->nodeValue;
if($index == 47) $Companies_House_Directors_Surname_5 = $cell->nodeValue;
if($index == 48) $Companies_House_Directors_Position_5 = $cell->nodeValue;
if($index == 49) $Companies_House_Directors_Title_6 = $cell->nodeValue;
if($index == 50) $Companies_House_Directors_Forename_6 = $cell->nodeValue;
if($index == 51) $Companies_House_Directors_Surname_6 = $cell->nodeValue;
if($index == 52) $Companies_House_Directors_Position_6 = $cell->nodeValue;
if($index == 53) $Companies_House_Directors_Title_7 = $cell->nodeValue;
if($index == 54) $Companies_House_Directors_Forename_7 = $cell->nodeValue;
if($index == 55) $Companies_House_Directors_Surname_7 = $cell->nodeValue;
if($index == 56) $Companies_House_Directors_Position_7 = $cell->nodeValue;
if($index == 57) $Companies_House_Directors_Title_8 = $cell->nodeValue;
if($index == 58) $Companies_House_Directors_Forename_8 = $cell->nodeValue;
if($index == 59) $Companies_House_Directors_Surname_8 = $cell->nodeValue;
if($index == 60) $Companies_House_Directors_Position_8 = $cell->nodeValue;
if($index == 61) $Companies_House_Directors_Title_9 = $cell->nodeValue;
if($index == 62) $Companies_House_Directors_Forename_9 = $cell->nodeValue;
if($index == 63) $Companies_House_Directors_Surname_9 = $cell->nodeValue;
if($index == 64) $Companies_House_Directors_Position_9 = $cell->nodeValue;
if($index == 65) $Companies_House_Directors_Title_10 = $cell->nodeValue;
if($index == 66) $Companies_House_Directors_Forename_10 = $cell->nodeValue;
if($index == 67) $Companies_House_Directors_Surname_10 = $cell->nodeValue;
if($index == 68) $Companies_House_Directors_Position_10 = $cell->nodeValue;
if($index == 69) $Companies_House_Directors_Title_11 = $cell->nodeValue;
if($index == 70) $Companies_House_Directors_Forename_11 = $cell->nodeValue;
if($index == 71) $Companies_House_Directors_Surname_11 = $cell->nodeValue;
if($index == 72) $Companies_House_Directors_Position_11 = $cell->nodeValue;
if($index == 73) $Companies_House_Directors_Title_12 = $cell->nodeValue;
if($index == 74) $Companies_House_Directors_Forename_12 = $cell->nodeValue;
if($index == 75) $Companies_House_Directors_Surname_12 = $cell->nodeValue;
if($index == 76) $Companies_House_Directors_Position_12 = $cell->nodeValue;
if($index == 77) $Companies_House_Directors_Title_13 = $cell->nodeValue;
if($index == 78) $Companies_House_Directors_Forename_13 = $cell->nodeValue;
if($index == 79) $Companies_House_Directors_Surname_13 = $cell->nodeValue;
if($index == 80) $Companies_House_Directors_Position_13 = $cell->nodeValue;
if($index == 81) $Companies_House_Directors_Title_14 = $cell->nodeValue;
if($index == 82) $Companies_House_Directors_Forename_14 = $cell->nodeValue;
if($index == 83) $Companies_House_Directors_Surname_14 = $cell->nodeValue;
if($index == 84) $Companies_House_Directors_Position_14 = $cell->nodeValue;
if($index == 85) $Companies_House_Directors_Title_15 = $cell->nodeValue;
if($index == 86) $Companies_House_Directors_Forename_15 = $cell->nodeValue;
if($index == 87) $Companies_House_Directors_Surname_15 = $cell->nodeValue;
if($index == 88) $Companies_House_Directors_Position_15 = $cell->nodeValue;
if($index == 89) $Companies_House_Directors_Title_16 = $cell->nodeValue;
if($index == 90) $Companies_House_Directors_Forename_16 = $cell->nodeValue;
if($index == 91) $Companies_House_Directors_Surname_16 = $cell->nodeValue;
if($index == 92) $Companies_House_Directors_Position_16 = $cell->nodeValue;
if($index == 93) $Companies_House_Directors_Title_17 = $cell->nodeValue;
if($index == 94) $Companies_House_Directors_Forename_17 = $cell->nodeValue;
if($index == 95) $Companies_House_Directors_Surname_17 = $cell->nodeValue;
if($index == 96) $Companies_House_Directors_Position_17 = $cell->nodeValue;
if($index == 97) $Companies_House_Directors_Title_18 = $cell->nodeValue;
if($index == 98) $Companies_House_Directors_Forename_18 = $cell->nodeValue;
if($index == 99) $Companies_House_Directors_Surname_18 = $cell->nodeValue;
if($index == 100) $Companies_House_Directors_Position_18 = $cell->nodeValue;
if($index == 101) $Companies_House_Directors_Title_19 = $cell->nodeValue;
if($index == 102) $Companies_House_Directors_Forename_19 = $cell->nodeValue;
if($index == 103) $Companies_House_Directors_Surname_19 = $cell->nodeValue;
if($index == 104) $Companies_House_Directors_Position_19 = $cell->nodeValue;
if($index == 105) $Companies_House_Directors_Title_20 = $cell->nodeValue;
if($index == 106) $Companies_House_Directors_Forename_20 = $cell->nodeValue;
if($index == 107) $Companies_House_Directors_Surname_20 = $cell->nodeValue;
if($index == 108) $Companies_House_Directors_Position_20 = $cell->nodeValue;
if($index == 109) $Record_ID_Number = $cell->nodeValue;

  $index += 1;
  endforeach;
  add_person($Company_Name, $Address_1, $Address_2, $Locality, $Town, $County, $Postcode, $Region, $Phone_no, $Fax_no, $No_of_Employees, $Years_Established, $Premise_Type, $Type_of_Business, $SIC_Code, $SIC_Description, $Turnover, $Est_Turnover, $Financial_Year_End, $Profit_Before_Tax, $Net_Worth, $Exports, $status, $notes, $Thomson_Verified_Contact_Title, $Thomson_Verified_Contact_Forename, $Thomson_Verified_Contact_Surname, $Thomson_Verified_Contact_Position, $Companies_House_Directors_Title_1, $Companies_House_Directors_Forename_1, $Companies_House_Directors_Surname_1, $Companies_House_Directors_Position_1, $Companies_House_Directors_Title_2, $Companies_House_Directors_Forename_2, $Companies_House_Directors_Surname_2, $Companies_House_Directors_Position_2, $Companies_House_Directors_Title_3, $Companies_House_Directors_Forename_3, $Companies_House_Directors_Surname_3, $Companies_House_Directors_Position_3, $Companies_House_Directors_Title_4, $Companies_House_Directors_Forename_4, $Companies_House_Directors_Surname_4, $Companies_House_Directors_Position_4, $Companies_House_Directors_Title_5, $Companies_House_Directors_Forename_5, $Companies_House_Directors_Surname_5, $Companies_House_Directors_Position_5, $Companies_House_Directors_Title_6, $Companies_House_Directors_Forename_6, $Companies_House_Directors_Surname_6, $Companies_House_Directors_Position_6, $Companies_House_Directors_Title_7, $Companies_House_Directors_Forename_7, $Companies_House_Directors_Surname_7, $Companies_House_Directors_Position_7, $Companies_House_Directors_Title_8, $Companies_House_Directors_Forename_8, $Companies_House_Directors_Surname_8, $Companies_House_Directors_Position_8, $Companies_House_Directors_Title_9, $Companies_House_Directors_Forename_9, $Companies_House_Directors_Surname_9, $Companies_House_Directors_Position_9, $Companies_House_Directors_Title_10, $Companies_House_Directors_Forename_10, $Companies_House_Directors_Surname_10, $Companies_House_Directors_Position_10, $Companies_House_Directors_Title_11, $Companies_House_Directors_Forename_11, $Companies_House_Directors_Surname_11, $Companies_House_Directors_Position_11, $Companies_House_Directors_Title_12, $Companies_House_Directors_Forename_12, $Companies_House_Directors_Surname_12, $Companies_House_Directors_Position_12, $Companies_House_Directors_Title_13, $Companies_House_Directors_Forename_13, $Companies_House_Directors_Surname_13, $Companies_House_Directors_Position_13, $Companies_House_Directors_Title_14, $Companies_House_Directors_Forename_14, $Companies_House_Directors_Surname_14, $Companies_House_Directors_Position_14, $Companies_House_Directors_Title_15, $Companies_House_Directors_Forename_15, $Companies_House_Directors_Surname_15, $Companies_House_Directors_Position_15, $Companies_House_Directors_Title_16, $Companies_House_Directors_Forename_16, $Companies_House_Directors_Surname_16, $Companies_House_Directors_Position_16, $Companies_House_Directors_Title_17, $Companies_House_Directors_Forename_17, $Companies_House_Directors_Surname_17, $Companies_House_Directors_Position_17, $Companies_House_Directors_Title_18, $Companies_House_Directors_Forename_18, $Companies_House_Directors_Surname_18, $Companies_House_Directors_Position_18, $Companies_House_Directors_Title_19, $Companies_House_Directors_Forename_19, $Companies_House_Directors_Surname_19, $Companies_House_Directors_Position_19, $Companies_House_Directors_Title_20, $Companies_House_Directors_Forename_20, $Companies_House_Directors_Surname_20, $Companies_House_Directors_Position_20, $Record_ID_Number);
  endif;
  $first_row = false;
  endforeach;
  endif;
print_r($data);


  ?>



<html>
    <head>
        
    </head>
    <body>
        <form action='#' method='post' name='names' enctype='multipart/form-data'>
            <table>
                <tr>
                    <td>Upload file :</td>
                    <td><input type='file' name='file'></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type='submit' value='upload'></td>
                </tr>
            </table>
        </form>
    </body>
</html> 

 

Many thanks

 

James.

Link to comment
Share on other sites

On every if line how come you arnt using { }? i think that might be the problem and on line 140 it should be $index ++;

 

good luck

 

Simple statements don't need curly braces + the OP is using the alternative syntax for some bizarre reason.

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.

Guest
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.