Loop through report and update account based on row data CPHP
I am trying to automate locking staff accounts if they have been inactive for 30 days. This is something we run manually from a report exception each morning.
I've been trying to write some PHP to do this but I cant seem to figure out how to loop through each line of the report after its been fetched. I want to save the account ID and Days to variables, and then action them via an account fetch.
The commented out code is what I will use within the loop when I can figure it out. I know there are multiple ways to do this, including a foreach, but I'm not sure how PHP handles and stores arrays to loop through each row properly.