PDA

View Full Version : Personal Hormonal Person (PHP)



Hunter
February 18th, 2010, 02:01 PM
YES, I do know PHP does not stand for that!

http://martynleeball.x10hosting.com/stokeGTA/portfolio/upload/scripts/1266523008.jpg
To people who know PHP, does this explanation look correct for the following code?



function getExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
I know for a fact you will all point out grammar problems. DONT! Please :0 I will sort them out later because I have seen many. I just want to make sure I have got the explanation right.

DEElekgolo
February 18th, 2010, 06:20 PM
regex (http://www.regular-expressions.info/php.html) yo.