PHP: How come I can't use ~ (tilde) at the end of a string?

bacon333

Senior member
Mar 12, 2003
524
0
0
I call a function called "formatstr" and it returns a string with a ~ attached to it:

$str = formatstr($str);
echo $str;

The $str is empty, even when I cast it to string. Without the ~ it works. Any ideas?
 

bacon333

Senior member
Mar 12, 2003
524
0
0
turned out to be an error in recursion somewhere. used a while loop instead, thanks igowerf.