<>
So ive found this code on the internet, but i dont understand the code. Can someone please help me?
<?php
$numbers= "2323";
$position = "RLRR";
$x = 1;
if (isset( $_GET['position'])){
$position = $_GET['position'];
}
for ($y =0; $y < strlen ($position); $y++) {
$href = $position;
$check = $position;
$color = "red";
if ( $href [$y] === 'L' ) {
$href [$y] = 'R';
} else {
$href [$y] = 'L';
}
$right = substr ($check, 0, $y);
$right = str_replace ("L", "", $right);
$right = strlen ($right);
$left = substr ($check, $y);
$left = str_replace ("R", "", $left);
$left = strlen ($left);
if ( intval ($numbers [$y]) === $right+$left) {
$color= "green";
}
if (($color ) === "green") {
$x ++;
}
?>
<td class=<?php echo $color; ?> ><?php echo $numbers[$y];?></td>
<td>
<a href="?position=<?php echo $href;?>">
<img class="<?php echo $position [$y];?>" src="Pijllinks.jpg"></a>
</td>
<?php
}
if (intval ($x) === 6) {
$b="green";
} else
return
?>