hadi wrote: > $string2 = $item->description; > preg_match('/http.*.jpg/',$string2,$match2); > $convert = implode(",", $match2); That is rather misleading code. After calling preg_match(), $match2 always is an array with a single element (if $string2 matches) or an empty array (if $string2 doesn't match). Calling implode(',', $match2) doesn't really make sense. I suggest using an if statement instead; see example #1[1] on the manual page. A minor issue is the unescaped dot in the regexp. Use '/http.*\.jpg/' instead. [1] <http://php.net/manual/en/function.preg-match.php#example-4947> -- Christoph M. Becker -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php