well, addslashes() would still not help even in the least in the example you made ;)

anyway, addslashes() basically mimics the functionality of magic_quotes_gpc, a feature that has been since deprecated in PHP5. the only time you should need to "add slashes" to anything is for entry into a database, and you should be using the proper database escaping function (mysql_real_escape_string(), for example), or prepared statements. I'll quote penagate here:
Quote Originally Posted by penagate
Rule of thumb: If you're using addslashes and stripslashes, you probably shouldn't be.