Re[4]: [PHP] Repeating Decimals
| From: | Tom Rogers | Date: | Sat, 07 Dec 2002 17:55:05 +0000 |
| Subject: | Re[4]: [PHP] Repeating Decimals | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127387@lists.php.net to get a copy of this message | ||
Hi,
Sunday, December 8, 2002, 1:46:07 AM, you wrote:
S> Ok, I'm getting some weird errors. Here's the website:
S> http://check.melchior.us/module.php?id=3
S> I attached the output file. What am I doing wrong!?
S> ----- Original Message -----
S> From: "Tom Rogers" <trogers@kwikin.com>
S> To: "Stephen" <webmaster@melchior.us>
S> Cc: "PHP List" <php-general@lists.php.net>
S> Sent: Friday, December 06, 2002 11:26 PM
S> Subject: Re[2]: [PHP] Repeating Decimals
>> Hi,
>>
>> Saturday, December 7, 2002, 6:36:18 AM, you wrote:
>> S> How would I run the functions though and then print the repeating
S> decimal to
>> S> the screen?
>>
>> The function returns the string ready to print
>> You will need to comment out the echo $s line, it was there for debugging.
>>
>> just do <?php echo repeat($nuber to check)?> where ever you need it
>>
>>
>>
>> --
>> regards,
>> Tom
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
You chopped off this line at the very begining of the function
$s = substr(number_format($num,16),0,-1); //make a string
--
regards,
Tom