Hi, I hope someone can help me. Currently my PHP script looks like (simplified) <?php $KW = $_GET['OVRAW']; echo 'You Activated Keyword '.$KW.' Just now'; ?> What I want to do is output something different if the $KW string ends in the characters '_0'. So, in my own crappy-pseudo-code-style <?php $KW = $_GET['OVRAW']; IF ($KW ends in '_0') { echo 'You Activated My Special Keyword '.$KW.' Just now'; } ELSE { echo 'You Activated A Normal Keyword '.$KW.' Just now'; } ?> I'm really stuck as I can't find a PHP function that can do this?? Please point me in the right direction someone?? Cheers Chris.
Maybe explode the the string at the _ and if the $result[ ]=0 { echo 'You Activated My Special Keyword '.$KW.' Just now'; } If the _ does not exist the value $result should be null.
Alternatively, you can just use substr... if(substr($KW,-2)=="_0") { echo "You activated my special keyword $KW just now."; } else { echo "You activated a normal keyword $KW just now."; } PHP: Jon