I want to pick digits between other groups of digits.
I think it is best that I show this pattern in order to explain what I mean:
xxxxx...xxxxyyyyyyy....yyyyzzzzzzz....zzzz
{ 1000 } { 1500 }
So from the above string structure, I want to pick the digits that occur between the first 1000 digits (xx) and the final 1500 digits (zz).
I tried substr
but as I have to specify the length it didn't work for me. Because I don't know what the length is between those two indexes.
Here is my code:
$id = base64_encode($core->security(1070).$list["user_id"]);
$core->security
creates number as many as what is input.
In this it example it creates a length of 1070 random digits.
$decoded = base64_decode($id);
$homework_id = mysqli_real_escape_string($connection,substr($decoded, 1070));
I can pick numbers after some length of digits. But I want to take them between series of digits.