Jump to content

How to add a + sign between words???


monkeybidz

Recommended Posts

I have a VAR that results in text like: "This is my sample result string"

 

How can I make it so it results like so : "This+is+my+sample+result+string"

 

The var is: $row[title]

 

The code is located below:

 

$query = "SELECT url, title, description FROM mylinks ORDER BY RAND() LIMIT 0, 1000";
$result = mysql_query($query);

while($row = mysql_fetch_array($result, MYSQL_ASSOC)){

    echo "<a href=\"http://www.clickraider.com/search.php?query={$row['title']}&search=1\">{$row['url']}</a><br>" .
        "{$row['title']} <br>" . 
         "ClickRaider Results: {$row['description']} <br><br>";
    
} 

Link to comment
https://forums.phpfreaks.com/topic/204027-how-to-add-a-sign-between-words/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.