Hello.
There is a form, the number of fields that are sent to php is always different, so everything is set through variables:
$conex=2 // номер выпадающего поля из ряда, всегда разный $colnum=4; // количество полей for ($i = 1; $i <= colnum; $i++) {if ($i==$conex)continue; echo '<input type=text name=foo'.$i. '>'; // примерно такой инпут у формы $foo1=$_post[foo1]; // // Все они таким же способом через for генерируются There is an array:
$arr = array("$id;$foo1;$foo3;$foo4); // условие на формирование фу такое же, как и у полей (for), то есть всегда есть то, что игнорируется print_r($arr); // Должно быть примерно так: Array ( [0] => 88;Text 1; Текст 3; Текст 4 ) то есть текст 2 игнорируется Question: how here $arr = array("$id; !место! );
Paste what I have generated in a similar way, like for
Then $arr will be loaded into the csv file, so I need to have such an array at the output: Array ( [0] => 88;Text 1;Текст 3;Текст 4). Perhaps within the framework of my question there is no solution and the desired is realized in a different way, in this case, I ask you to throw in an idea for that. PS I am writing from the phone.