Sorry, but a slight amendment to my code was required. The new version is below. $http = substr( $imgURL, 0, 7 ); if ( $http != 'http://' ) substr_replace($imgURL, 'http://soon.com', 0, 0); Edward Dudlik Becoming Digital www.becomingdigital.com ----- Original Message ----- From: "Becoming Digital" <subs@becomingdigital.com> To: "Paul Ihrig" <pihrig@columbus.rr.com>; <php-db@lists.php.net> Sent: Friday, 16 May, 2003 20:17 Subject: Re: IF :: find and Replace string $http = substr( $imgURL, 0, 7 ); if ( $http != 'http://' ) substr_replace($imgURL, 'http://', 0, 0); Edward Dudlik Becoming Digital www.becomingdigital.com ----- Original Message ----- From: "Paul Ihrig" <pihrig@columbus.rr.com> To: <php-db@lists.php.net> Sent: Friday, 16 May, 2003 10:35 Subject: IF :: find and Replace string also how would i do an IF that checks to see if the image source has a http:// at the beginning. if not then force it to use http://blabla.com/imagename. this line below returns a users avatar. <?php if (!(strcmp($row_rsForumUser['ID_MEMBER'], $row_rsMember['ID_MEMBER']))) { echo "<img width=\"80\" height=\"80\" src=\""; echo $row_rsForumUser['avatar']; echo "\"\>";} ?> right now if it is a custom icon the users has it stored on there own server like http://paulihrig.com/tl/jellybayby.jpg but what messes the line above up is that if the user has it stored on our server then it would only display "batman.gif" with now starting http://soon.com/ so i need to force it in there.. any ideas. thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php