I have multidimensional arrays that are generated by dynamic form inputs that a user can add to add things like awards, jobs and education.
When I collect the array data to push it to the .csv it prints the array groupings like this FinanceWaterlooTheodore2015TreasurerTorontoGary2014
.
Is it possible to mark a point where the array loop ends so it can be more legible and come out more like this FinanceWaterlooTheodore2015//TreasurerTorontoGary2014?
$unitLevelInvolvement = $_POST["unitLevelInvolvement"];
$unitInvolvementValue = "";
$i;
foreach($unitLevelInvolvement as $involvement)
{
$i++;
$unitInvolvementValue .= $involvement;
}
echo $unitInvolvementValue;
<div name="unitLevelInvolvement" id="unitLevelInvolvement">
<input type="text" class="two-lines-textbox" name="unitLevelInvolvement[]" placeholder="Position/Committee" onBlur="this.placeholder='Position/Committee'" onFocus="this.placeholder=''" onKeyUp="checkPage3()" />
<input type="text" class="two-lines-textbox" name="unitLevelInvolvement[]" id="oectaUnit_1" placeholder="Unit" onBlur="this.placeholder='Unit'" onFocus="this.placeholder=''" onKeyUp="checkPage3()" />
<div class="clearFix"></div>
<input type="text" class="two-lines-textbox" name="unitLevelInvolvement[]" id="unitPresident_1" placeholder="Unit President" onBlur="this.placeholder='Unit President'" onFocus="this.placeholder=''" onKeyUp="checkPage3()" />
<input type="date" class="two-lines-textbox" name="unitLevelInvolvement[]" id="unitYear_1" onKeyUp="checkPage3()" />
<input type="button" value="+" onClick="addUnitInvolvement()" />
</div>
</div><!-- end of unit-level-involvement div-->
<input type="submit" value="submit" />
</form><!--endForm-->