I am trying to get remainder value using php:
Example:
$string1 ="1477014108152000180343081299001";
$string2 ="1731731731731731731731731731731";
Each digit of $string1 is multiplied by each digit of $string2
$string1 = 1 4 7 7 0 1 4 1 0 8 1 5 2 0 0 0 1 8 0 3 4 3 0 8 1 2 9 9 0 0 1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$string2= 1 7 3 1 7 3 1 7 3 1 7 3 1 7 3 1 7 3 1 7 3 1 7 3 1 7 3 1 7 3 1
Starting from the front of the string Sum=1 + 28 + 21 + 7 + 0 + 3 + 4 + 7 + 0 + 8 + 7 + 15 + 2 + 0 +0 + 0 + 7 + 24 + 0 + 21 + 12 + 3 + 0 + 24 + 1 + 14 +27 +9 + 0 + 0 + 1 = 246
Remainder = 246 % 10= 6
I want to create array of $string1 and $string2, so that I can easily multiply each value. Please help me to split $string1 and $string2 in to array.
I want array as below:
$array=array('1','7','3','1','7','3','1','7','3','1','7','3','1','7','3','1','7','3','1','7','3','1','7','3','1','7','3','1','7','3','1');