php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14849 str_replace() doesn't understand the '\t' escape sequence
Submitted: 2002-01-04 10:04 UTC Modified: 2002-01-13 08:52 UTC
From: no at email dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 4.1.0 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 + 21 = ?
Subscribe to this entry?

 
 [2002-01-04 10:04 UTC] no at email dot com
$content = str_replace("\t", "", $content);
- doesn't do antything, ie str_replace() doesn't understand the '\t' escape character

$content = str_replace("\x09", "", $content);
works fine however

thanks for php! =)

*hugs*

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-13 08:52 UTC] swm@php.net
Appears to be solved in current CVS:

<?
$content = "that    this";
$content = str_replace("\t", "", $content);
echo $content;
?>

[swm@www test]$ ../php4/php -q t.php | od -c |less
0000000   t   h   a   t   t   h   i   s
0000010

moreover:

[swm@www test]$ ../php4/php -q t.php | od -c |less
0000000   t   h   a   t   t   h   i   s
0000010

Closing. Reopen if you still have problems.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 05 05:01:29 2024 UTC