I have just realised that the code I gave you doesn't work!
My apologies. I was thinking about Combo boxes and applying the same logic to listboxes which is incorrect.
I have examined the properties of a bound listbox I have and it does not show the columns anywhere. I also have an unbound listbox which has a Value List as its RowSource type. in this case, I can retrieve the selected item from the RowSource property once the values are loaded. It may be that this latter case will work for you, so I've included a solution at the end of this post.
The only alternative suggestion I can offer are:
1. Use a Value List as the Row Source Type and add the PHP items to it using the AddItem method. When the user clicks on an item, you can retieve the RowSource to a string array and use the listindex to reference the elements you need (see example below).
2. Use a Combo box for your PHP data - in which case the column selection does work or
3. Create a table of your PHP inputs and use the table as your RowSource. As you say, you can get the index of the selected item from the listbox and you can then use this to retrieve the item details from the table.
I'm sorry if I have caused you grief! I'm surprised no-one else jumped on me for this error!
Example of listbox with Value List:
Dim i As Integer
Dim varArray As Variant
varArray = Array("one", "two", "three", "four", "five")
Rem the following clears the listbox entries
Me.lsbItems.RowSource = vbNullString
Rem the following adds values from an array to the listbox with two columns
For i = 0 To UBound(varArray)
Rem first entry looks like this: "01" "One" (columns 0 & 1 respectively)
Me.lsbItems.AddItem Format(i + 1, "00") & ";" & StrConv(varArray(i), vbProperCase)
In the click event of the listbox:
Private Sub lsbItems_Click()
Dim strItems() As String
Rem retrieve the rowsource to an array - elements are delimited by ";"
strItems = Split(Me.lsbItems.RowSource, ";")
Rem retrieve columns 0 & 1 for the item selected in the listbox
Rem for a 2-column listbox, column 0 data are in even numbered elements of the array (0, 2, ...), column 1 data are in odd numbered elements of the array (1, 3, ...)
MsgBox "Selected item:" & vbCr & "Column 0 is '" & strItems(Me.lsbItems.ListIndex * Me.lsbItems.ColumnCount) & "'" & vbCr & "Column 1 is '" & strItems(Me.lsbItems.ListIndex * Me.lsbItems.ColumnCount + 1) & "'"