$i = 0 ;  $i < $imageCount ;  $i ++){      $testPattern1  =  '/^https?:\/\//' ;      $testPattern2  =  '/\//' ;  Don't set variables that are invariant inside a loop; you're just wasting cycles. Originally Posted by learning_brain PHP Code:      if ( $images [ 1 ][ $i ] =  preg_match (??????????????)){