im trying to check if the last 3 letter of a string are pdf but it doesnt work this is my code so far hope someone can help
$CV = $_POST["CV"];
$lengthCV =strlen($CV);
if(strpos("$CV","pdf",substr('$CV',$lengthCV - 3)) !== false){
echo "your file is a pdf";
}
else{
echo "you didnt upload a pdf file";
die();
}