SphereCommunity

Full Version: Language Crossing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Who else does this on a daily basis?? LolLol

PHP Code:
$dir = new DirectoryIterator($scriptPath);
foreach (
$dir as $file){
    if (
$file->getExtension() == "scp"){
        if (
preg_match("/(points.*?)/i"$file)){
            echo 
"Ignoring $file ... \n";
            continue;
        endif 
// <---------
        
        
echo "Scanning $file ... \n";
        
$fullPath $scriptPath $file;
        
$total += areadefExport($fullPath$file$conn);
    }

What are you trying to do?
Oh, that's just a piece of a PHP script I wrote to search .scp files for stuff. I spent a few minutes trying to figure out why PHP was throwing an unexpected string error and then I realized I ended the IF block with "ENDIF" instead of a bracket.
Lol now I see. Ya this happens when you play with multiple coding languages.
Reference URL's