I'm having a problem with the substr function. I want it to be dynamic in a for loop as follows:
for ($i = substr $bin, $sub, 1 ; $sub < $len2 ; $sub++){
You can probably guess what this code is meant to do. I want to read each character in the string separately and operate on it in the for loop. The problem is that this code doesn't do what I want it to do. Is there a way to use substr for this? Is there a better way to do what I'm trying to do, possibly without substr? Thanks in advance for any help.