I am trying to keep track of a product number and a description of the product. In other programming languages I have used, I would have dimensioned a variable. This would have allowed (in the other languages) to have:
ID$[1] ID$[2] PRODUCT$[1] PRODUCT$[2] ... etc.
If product number 112 was ordered in a qty of 12, it would be placed into ID$[112] and the description would be placed into PRODUCT$[112].
This would allow the ability of a whole shopping site to be created without any cookies or sessions since the whole session could be placed in memory. I am close to finishing this project.
If arrays are not possible, I was thinking of creating 2 strings where the position would be a calculation of the product number. If the product numbers were from 1-999, the following positioning in the string would be true:
The qty bought for product number 101 would be:
( ( (PRODUCTNUMBER -1) X 3 ) + 1) or a position of 1 for the length of 3
The same formula would be true for the description but each description would have to be padded with spaces so that each length was exactly the same.
Any ideas... Thanks as I am new to PHP.