Confusing with a php variable issue -
in below code, after preg_match
, $videoinfo['video']['rendering']
equals "progressive".
so, expecting final echo output "rendering: progressive scan".
however, doesn't. outputs "rendering: progressive" missing obvious here?
thanks 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']); }
you this
echo("rendering: " . $videoinfo['video']['rendering']);
and outputs "rendering: progressive."
that means $videoinfo['video']['rendering']
contains string progressive.
. mind dot!
so has 1 character (the dot), , that's why equals doesn't work.
Comments
Post a Comment