Hi, looking for some help to reformat a mutli-dimensional associate array that is returned from the COM function ExecQuery, specifically processess.
$comobj = new COM (“winmgmts:\\.\root\cimv2”);
$processes = $comobj->ExecQuery(“select * from Win32_Process”);
I can go through $processes in a foreach loop and get all the elements if I refer to each key (ie…handle, caption, etc…), but I would like to be able to reformat the contents of the array to a string without having to specify each key.
I’ve tried nested foreach loops, implode, etc…they all seem to hang up on the format of the array for some reason.
Has anyone attempted this before or have any suggestions to help get through this array without having to specifically name each key?
Thanks,
Scott