In the below code, after the preg_match, $videoinfo['video']['rendering'] most definitely equals "Progressive".
So, I am expecting the final echo to output "Rendering: Progressive Scan".
However, it doesn't. It outputs "Rendering: Progressive" Am I missing something obvious here?
Thanks for your help!
if(preg_match("/^Video Field Order\s+:(.*)$/im",$output,$matches)){
$videoinfo['video']['rendering'] = $matches[1];
if($videoinfo['video']['rendering'] == "Progressive"){
$videoinfo['video']['rendering'] = 'Progressive Scan';
}
echo("Rendering: " . $videoinfo['video']['rendering']);
}
trim($matches[1]);true, which means the string is not actually "Progressive". Likely some additional trailing whitespace or so.