Created
June 13, 2015 03:27
-
-
Save gera3d/0a6e091b650ba87d732a to your computer and use it in GitHub Desktop.
Little Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Here is what I think you where asking me for on the reverse thing | |
$hello = "Hello "; | |
echo strrev( $hello ); | |
$hello_back = strrev( $hello ); | |
//Reverse the string back without using the stock function | |
$length = strlen($hello_back)-1; | |
$i = 0; | |
while ($i < $length+1) { | |
echo $hello_back[$length-$i]; | |
$i++; | |
} | |
//Create your own custom sum function | |
function sum_custom($x, $y) { | |
$z = $x + $y; | |
return $z; | |
} ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment