Computing.Net > Forums > Web Development > calculate days between 2 dys in php

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

calculate days between 2 dys in php

Reply to Message Icon

Name: BASSUHG
Date: February 26, 2009 at 21:41:38 Pacific
OS: Windows XP
Subcategory: PHP
Comment:

hi everyone,
how to calculate difference between 2 dates,
i am retrieving the dates from html file.
Below is the code where i retrieve the data.
i want to calculate with each and everyone from present date. Its urgent
Thanx in advance
<?php

function parse_array($string,$beg_tag,$close_tag)
{
preg_match_all("($beg_tag(.*)$close_tag)siU", $string, $matching_data);
return $matching_data[0];
}

$string=file_get_contents("callback.html");
$src=parse_array($string,"<td nowrap=\"nowrap\">","</td>");

for($i=0;$i<count($src);$i++)
echo $src[$i]."</br>";
echo "</br>";

?>



Sponsored Link
Ads by Google

Response Number 1
Name: Rayburn
Date: February 26, 2009 at 21:47:00 Pacific

Response Number 2
Name: BASSUHG
Date: February 26, 2009 at 22:26:45 Pacific
Reply:

i tried google, php.net
i want the array items to be passed to function. how?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: calculate days between 2 dys in php

Open URLs in PHP w/out opening wind www.computing.net/answers/webdevel/open-urls-in-php-wout-opening-wind/199.html

Stuck with ereg_replace in PHP www.computing.net/answers/webdevel/stuck-with-eregreplace-in-php/3003.html

Date in php www.computing.net/answers/webdevel/date-in-php-/506.html