Skip to content

Instantly share code, notes, and snippets.

@duckbox
duckbox / gist:4096222
Created November 17, 2012 14:09
Reverse a string without reverse PHP
$string = 'FFS';
// Split the each character in the string into an array
$stringInArray = str_split($string,1);
// Reverse the array
$reverse = array_reverse($stringInArray);
// Put the array together without spaces and echo
echo implode('',$reverse);
.box {
display : block;
@include iphone {
display : inline
}
@duckbox
duckbox / gist:3464892
Created August 25, 2012 12:27
If E. L. James wrote JavaScript
(function(){
// This Chapter
window.open('http://pornhub.com','_blank');
// Next Chapter
window.location.href = window.location.href
})();