How To pair and rearrange string values from a variable in PHP ?
Leo Lesole last edited by
Let me summarize the above code, the first variable which is Parttype stores a list of part types from an input field, the second variable stores part labels and the third variable stores BIN numbers. As you can see my output from the commented code*(Line 187)*, I to take the first values and pair them together, take the second values and pair them together, and last values to pair them together too. How would I achieve this in PHP, just to summarize my question let me attach an image of what I want.
avan last edited by
To do string concatenation in PHP you can use a period (dot)
$DataToDB = "Parttype=".$partType."&LabelPart=".$labelPart."&PartBin=".$partbin;
Not sure if that is what you had in mind. Let me know.