marcus Posted November 14, 2006 Share Posted November 14, 2006 [code]<?phpinclude("mysql.php");include("header.php");$by = $_POST[by];if(!$by){$by = id;};echo "<table border=0 cellspacing=1 cellpadding=0><tr><td>Username<td>Email<td>Website<td>Mail";$q = "SELECT * FROM `users` ORDER BY $by";$query = mysql_query($q);while($user = mysql_fetch_assoc($query)){str_replace("http://","",$user[website]);echo "<tr><td>$user[username]<td><a href='mailto:".$user[email]."'>$user[email]</a><td><a href='http://".$user[website]."' target='_blank'>Site</a><td><a href='mailbox.php?action=write&id=".$user[id]."'>Mail</a>";};mysql_free_result($query);echo "</table>";include("footer.php");?>[/code]i'm trying to replace http:// in user's defined website address Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 14, 2006 Share Posted November 14, 2006 You are not assigning the str_replace value to anything! Try reassigning the new value back to itself.$user[website] = str_replace("http://","",$user[website]); Quote Link to comment Share on other sites More sharing options...
marcus Posted November 14, 2006 Author Share Posted November 14, 2006 Alright, works, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.