0

It is my understanding that this might seem easy for you but to me it seems like I have to move a mountain since I am a beginner. I have the following while loop:

$rows = array();
while($r = mysql_fetch_assoc($result)) {

$images[]=$r['images'];

    $content=$r['content'];


}

That loops prints the "content" column of a MySQL db query. What I get is a relative URL that I want to convert to an absolute one by just prefixing "http://offercat.com/media/com_jbusinessdirectory/pictures" before every "images" result.

Any ideas on that ?

Thank you in advance.

  • 1
    possible duplicate of [php String Concatenation, Performance](http://stackoverflow.com/questions/124067/php-string-concatenation-performance) – Alessandro Da Rugna Jul 20 '15 at 08:59

1 Answers1

3

You can concatenate strings with a . in php. So it would look like this:

$images[] = "http://offercat.com/media/com_jbusinessdirectory/pictures".$r['images'];
Daan
  • 12,099
  • 6
  • 34
  • 51