I am trying to find a way to change the line, I saw alternatives, but I wanted it to think outside the box this way and not use any other code as an alternative, the code below changes the line, but I keep getting this error:
Note: Undefined offset: 25 in C: \ wamp \ www \ test \ index.php on line 15
25 - the length of the string, which is de-incremented.
//error_reporting(NULL); $string = trim("This is a reversed string"); //find length of string including whitespace $len =strlen($string); //slipt sting into an array $stringExp = str_split($string); //deincriment string and echo out in reverse for ($i = $len; $i >=0;$i--) { echo $stringExp[$i]; }
early
source share