I dont really understand what you are trying to do... you make an array containing extensions but never use it.
One problem could be that you are making a Variable global after defining its contents.
Maybe if you could explain in a little more detail about what you are trying to do i will be able to help you further.
Thanks
John
ADDON
Uniflare is correct but there is no need for all those If and else... try this
if ($ext=='jpg' or $ext=='png' or $ext=='gif') {
echo $chrisimg;
}elseif ($ext=='swf'){
echo"<object width=\"550\" height=\"400\">
<paramname=\"movie\" value=\"$picture_url\">
<embed src=\"$picture_url\" width=\"550\"
height=\"400\"></embed></object>";
}else{
//you can add code to this section to deal with
//unsupported types.
}
Also note that in the array you made you have included the point in the extension eg .jpg not jpg
Also it is better if you use braces ( { } ) to open and close your statements... php may not run your code correctly otherwise.
Thanks again