PDA

View Full Version : PHP Programers out there?



SyntaXmasteR
01-04-2006, 10:30 AM
I need to format the output of my text as followed:

*0 characters per line and NO white space. The *0 chars per line is no problem but i cant seem to get rid of the white space. Here is my code:


<?
$numberlength=strlen($number);
$count=0;

for($i=0;$i<$numberlength;$i++)
{
if($count==2*)
{
echo $number[$i] . "<br>";
}
else
{
echo $number[$i];
}
$count++;
}
?>


I tried to use the chr(*-**) in place of the <br> tag but nothing worked. Any ideas?

stimpy
01-05-2006, 12:22 AM
http://au.php.net/trim

yuo obviously know a lot more about php than i do.
possibly you could somhow use trim
but im guessing you mean whitespace between individual characters,,,,might be worth a look,,,
can a single character be a string?

or maybe run this over it somhow after the above code has made the string output

SyntaXmasteR
01-05-2006, 12:18 PM
Thanks for looking around for me ~ I checked out the trim function and it seems like this would be used to get rid of the white space or any other characters in a string. I need to keep any white space that is in my strings. The problem arises when i try to print only *0 characters on each line. For some reason white space is automatically added at the end of each line. This will throw the decryption off completely.

You can check it out here: http://www.boninroad.com/syntax******/tools/
Use either the converter or word scrambler. You will get a better understanding.

Thanks

~SyntaX