Well, $ascii is a user-inputted variable. The program is supposed to reverse ascii art, such as:
…………………………………………………. __ . __……………………
……………………………………………….../’`: : `\,---`.„…………………
………………………………………………../|,-‘`¯¯`\(0)_\,----,,,_………..
………………„~*¯¯`”\,………...._„_......…( `\(0),,_/`;;;;; o : :

`-, …...
……………../ : ·: (“,.~;*’¯¯¯”\,(_,-- ``”~,….\ : ;/\;;;;; : : : : : : : : : :`\…..
………….....| : · :,/`,-*~;~··-„,/(‘` ``)/· ,…\.,/` :

_): : : : :: : : : : : : : \…
…………….| : · / ,/`,--\ \’`0\,---„1 ‹’`--(_ ,// : : : :;; : : : : : : : : : : : : : |…
……………..) : µ’` .\ (0) `;;;. . ·`), . ,-~`. \: : : : : : ;;: : : : : : : : : : : :/…
……………/` ,/_~-, .;;;;„-„,__,./, ```/……. `\: : : : · · : : : : : : : : : :,-‘ ….
……………`-/¨;--;~’ `”*-=,,__`” ,) ,/`……….`› : : : :_,--*'`¯¯”~----,--`…….
…„„………__\, · ‘, · . . . `/,_,\ ,/,-,_ ……. /` ` | ./¯ · · · · · · · „-“…………
.( :·`\,-~*`¯ · · ·`¯` `~--~*~---~;/`,-~*```*--, `1` / : | · · · ,---~*”`……………
. \·:··:”*~-,,„„____„„,.-~”`¯¯¯¯/ / · · · · · ‘\,) , / : :| · · · ·\………………….
…`”’~-,„„„„„„,,~‘`` . ( · · · ,.__| | · · · ·, `\„„/ ,/`: : / · · · · ·| ………………..
…………………….\`”””` · · ·`’~;-,„,,_)”`_-‘ : : / · · · · · · | ………………..
……… (`*”-,„,-”¯¯”`-;„· · · · · · , /'``,-~”`¯: : : :/ · · · · · · |.………………..
………. | :: (,;-===-„, `\,· · · ,-`| · ·/ : : : | :,/` · · · · · · ·| ………………..
……… . \ : :\, · · · · \\ · `\. ·)· / · / : :\ : :`~,_ · · · · · ./ …………………
………… \\,_`~.,_„,.-*\\, `/,/„/` ,/ : : :`’;-.„_ : ¯-, · · · /,…………………..
…………..`\,,`”| : :`-,„_„))’`"` ·,/`_„,~*’` · · ( · , ,`)· ·,-; `’\,………………..
……………..`*-\ : : : `~----~*` / · · · · · · · · “”~”` ·/` ·( _: )………………
…………. ,.¬-,--\ : : : : : : : : / · · · · · · · · · ·,,-“`…..’-„,-‘……………….
…………..| |: :*:\ : : : : : : :_/ „____„„„„,---~*`……………………………
…………./ / : : : `~-„„„„„,.;;`,,.--`………………………………………….
…………| | : : : :|¯ : ,/ ¯ ………………….........................................
………….\,\,_,„./---~`………………………………............................
………………………………………………………………………………
Code:
$ascii = stripslashes($ascii);
$ascii = nl2br($ascii);
$line_count = substr_count($ascii, "<br />");
$pieces = explode("<br />", $ascii);
for($i=0; $i <= $line_count; $i++) {
echo strrev($pieces[$i]) . "<br>";
}
That is the code I use to actually reverse the ascii art, but some characters need to be flipped around (Such as / and \). Even though using double back slashes doesn't give me an error, it doesn't actually reverse it.