I was trying to save the loop sequence into log.txt file but it\'s giving my this error:
substr() expects parameter 1 to be string, array given.
My code: