Search found 10 matches
- Wed Jul 20, 2005 3:07 am
- Forum: PHP - Code
- Topic: Arithmetic
- Replies: 4
- Views: 535
- Tue Jul 19, 2005 10:21 am
- Forum: PHP - Code
- Topic: Arithmetic
- Replies: 4
- Views: 535
Arithmetic
Hello people
I have a little issue with PHP cutting off my decimals.
This will print 10.5 but I want it to print 10.50
How do I make sure I always have 2 decimals behind the point?
Thanks
I have a little issue with PHP cutting off my decimals.
Code: Select all
<?php
$var1 = 5.00;
$var2 = 5.50;
print $var1 + $var2;
?>How do I make sure I always have 2 decimals behind the point?
Thanks
- Tue Jul 05, 2005 4:54 pm
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
- Tue Jul 05, 2005 11:15 am
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
- Tue Jul 05, 2005 11:07 am
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
We just talked about that burrito. Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), the sleep() ...
- Tue Jul 05, 2005 10:53 am
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
- Tue Jul 05, 2005 9:11 am
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
- Tue Jul 05, 2005 8:45 am
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
I read about error handling in the manual and thought I might get it to work with set_time_limit(). But I saw the following: Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that hap...
- Tue Jul 05, 2005 5:46 am
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
- Mon Jul 04, 2005 6:53 pm
- Forum: PHP - Code
- Topic: Setting a timeout
- Replies: 16
- Views: 2971
Setting a timeout
Hello People, I'd like to add timeout functionality to the following code: <?php $domainName = "thisdoesntexist123noway0.ws"; $result = @exec("whois -h whois.website.ws ".$domainName, $response, $status); if (!result) { return "Error trying to contact server. Try again."...