function printTextDiagonallyRecursivelyLTR($spaces, $text) {
if (strlen($text) > 0) {
echo $spaces . $text[0] . "\n";
printTextDiagonallyRecursivelyLTR($spaces . " ", substr($text, 1));
}
}
printTextDiagonallyRecursivelyLTR("", "HELLO WORLD");
/*
run:
H
E
L
L
O
W
O
R
L
D
*/