I'm quite new with C#. I have a function which gives me the results in an array like this
[0] => value
[1] => value
[2] => value
[3] => value
[4] => value
But in my case, [0] [1] [2] need to be together, and I show them in a table in PHP. This is my function:
public List<string> ReadOpenCalls(int relation)
{
IQAssemblyResolver.Initialize(@"C:\Program Files\.....");
IQSDK IQSDK = new IQSDK();
string loginTekst = IQSDK.Login("Administrator", "..", "..").GetResult();
SDKRecordset inboundSet = IQSDK.CreateRecordset("R_ACTIONSCOPE", "CODE, DESCRIPTION, DATECREATED", "FK_RELATION = " + relation, "");
var messages = new List<string>();
if (inboundSet != null && inboundSet.RecordCount > 0)
{
inboundSet.MoveFirst();
do
{
string code = inboundSet.Fields["CODE"].Value.ToString();
string desc = inboundSet.Fields["DESCRIPTION"].Value.ToString();
string date = inboundSet.Fields["DATECREATED"].Value.ToString();
messages.Add( code);
messages.Add( desc);
messages.Add( date);
inboundSet.MoveNext();
}
while (!inboundSet.EOF);
return messages;
}
messages.Add("Error niet gelukt");
return messages;// null;
}
I want the output to be something like this:
[0] => [0] => "desc"
[1] => "code"
[2] => "date"
So that I can output this in a nice way in my table in PHP.