Note that there are some explanatory texts on larger screens.

plurals
  1. POphp getimagesize() function returning the 1, 1 (Width, Height)
    text
    copied!<p>When I run <code>getimagesize()</code> with individual image files with this code</p> <pre><code>$list = getimagesize("http://img.bleacherreport.net/img/images/photos/002/386/662/hi-res-159212879_crop_north.jpg?w=650&amp;h=440&amp;q=75"); echo '&lt;pre&gt;'; print_r($list); </code></pre> <p>it returns</p> <pre><code>Array ( [0] =&gt; 650 [1] =&gt; 440 [2] =&gt; 2 [3] =&gt; width="650" height="440" [bits] =&gt; 8 [channels] =&gt; 3 [mime] =&gt; image/jpeg ) </code></pre> <p>But when I run <code>getimagesize()</code> in a loop</p> <pre><code>foreach ( (array) $image_list as $imagepath ) { $list = getimagesize($imagepath); echo '&lt;br/&gt;'.$list[0].'-'.$list[1]; } </code></pre> <p>it returns <code>1 - 1</code>. This is my problem. it is returning this array if i print the <code>$list</code> array</p> <pre><code>Array ( [0] =&gt; 1 [1] =&gt; 1 [2] =&gt; 1 [3] =&gt; width="1" height="1" [bits] =&gt; 1 [channels] =&gt; 3 [mime] =&gt; image/gif ) </code></pre> <p>Array List for <code>foreach</code> loop</p> <pre><code>Array ( [0] =&gt; http://b.scorecardresearch.com/p?c1=2&amp;c2=6246855&amp;c4=bleacherreport.com/articles/1694365-nba-free-agents-2013-players-who-will-make-big-impact-on-new-teams&amp;cv=2.0&amp;cj=1 [1] =&gt; http://pixel.quantserve.com/pixel/p-3a-0o8sJKz6Ek.gif [2] =&gt; http://static2.bleacherreport.net/images/redesign/common/loading/small.gif?1372800971 [3] =&gt; http://static.bleacherreport.net/images/redesign/modules/uber-module/teamstream_header.png [4] =&gt; http://cdn.bleacherreport.net/images/team_logos/24x24/nba.png [5] =&gt; http://static.bleacherreport.net/images/redesign/common/icon_comment.png [6] =&gt; http://img.bleacherreport.net/img/images/photos/002/386/662/hi-res-159212879_crop_north.jpg?w=650&amp;h=440&amp;q=75 [7] =&gt; http://img.bleacherreport.net/img/article/media_slots/photos/000/953/247/hi-res-158291245_crop_exact.jpg?w=650&amp;h=432&amp;q=85 [8] =&gt; http://img.bleacherreport.net/img/article/media_slots/photos/000/953/261/hi-res-7261336_crop_exact.jpg?w=650&amp;h=434&amp;q=85 [9] =&gt; http://img.bleacherreport.net/img/article/media_slots/photos/000/953/256/hi-res-171671545_crop_exact.jpg?w=340&amp;h=227&amp;q=85 [10] =&gt; http://img.bleacherreport.net/img/article/media_slots/photos/000/953/253/hi-res-167372126_crop_exact.jpg?w=650&amp;h=434&amp;q=85 [11] =&gt; http://static2.bleacherreport.net/images/redesign/common/loading/small.gif?1372800971 [12] =&gt; http://img.bleacherreport.net/img/images/photos/002/383/560/hi-res-6914404_crop_650_crop_north.jpg?w=200&amp;h=126&amp;q=75 [13] =&gt; http://img.bleacherreport.net/img/images/photos/002/383/690/ScreenShot2013-07-02at3.21.16PM_crop_north.png?w=200&amp;h=126&amp;q=75 [14] =&gt; http://img.bleacherreport.net/img/images/photos/002/380/987/Screenshot2013-07-01at10.08.02AM_crop_north.jpg?w=200&amp;h=126&amp;q=75 [15] =&gt; http://static.bleacherreport.net/images/redesign/avatars/default-user-icon-comment.png [17] =&gt; http://static2.bleacherreport.net/images/redesign/common/loading/small.gif?1372800971 [18] =&gt; http://static.bleacherreport.net/images/articles/no-comments.png [19] =&gt; http://static.bleacherreport.net/images/shared/spinners/big.gif [20] =&gt; http://static.bleacherreport.net/images/redesign/articles/vote.png [21] =&gt; http://static.bleacherreport.net/images/redesign/articles/reply.png [22] =&gt; http://static2.bleacherreport.net/images/redesign/common/loading/small.gif?1372800971 [23] =&gt; http://static2.bleacherreport.net/images/redesign/common/loading/small.gif?1372800971 [24] =&gt; http://img.bleacherreport.net/img/images/photos/002/380/803/ScreenShot2013-06-30at10.54.05PM_crop_north.jpg?w=100&amp;h=68&amp;q=75 [25] =&gt; http://img.bleacherreport.net/img/images/photos/002/386/676/hi-res-157492860_crop_north.jpg?w=100&amp;h=68&amp;q=75 [26] =&gt; http://img.bleacherreport.net/img/images/photos/002/386/826/hi-res-167733787_crop_north.jpg?w=100&amp;h=68&amp;q=75 [27] =&gt; http://img.bleacherreport.net/img/images/photos/002/386/396/ScreenShot2013-07-04at5.12.55PMcopy_original_crop_north.jpg?w=100&amp;h=68&amp;q=75 [28] =&gt; http://img.bleacherreport.net/img/images/photos/002/386/670/hi-res-6960530_crop_north.jpg?w=100&amp;h=68&amp;q=75 [29] =&gt; http://img.bleacherreport.net/img/images/photos/002/386/690/ScreenShot2013-07-05at9.42.36AM_original_crop_north.jpg?w=100&amp;h=68&amp;q=75 [30] =&gt; http://img.bleacherreport.net/img/images/photos/002/265/104/ScreenShot2013-04-17at3.07.21PM_crop_north.png?w=340&amp;h=234&amp;q=75 [31] =&gt; http://img.bleacherreport.net/img/images/photos/002/320/773/hi-res-72281689_crop_north.jpg?w=100&amp;h=68&amp;q=75 [32] =&gt; http://img.bleacherreport.net/img/images/photos/001/909/267/ScreenShot2012-09-27at10.14.17AM_crop_north.png?w=100&amp;h=68&amp;q=75 [33] =&gt; http://static2.bleacherreport.net/images/articles/icon-fb.png?1372800977 [34] =&gt; http://static2.bleacherreport.net/images/redesign/facebook/connect.png?1372800977 [35] =&gt; http://cdn.bleacherreport.net/images/team_logos/50x50/nba.png [36] =&gt; http://static2.bleacherreport.net/images/redesign/common/loading/small.gif?1372800977 [38] =&gt; http://analytics.bleacherreport.com/b/ss/sidbleacherreport/1/H.25.2--NS/0 ) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload