Hi,

Try:

$Date_parts = explode("-", "Y-M-D");

It will return an array with the parts.

Sincerely,
Mike
--  
Mike Brandonisio          *    Web Hosting
Tech One Illustration     *    Internet Marketing
tel (630) 759-9283        *    e-Commerce
[EMAIL PROTECTED]    *    http://www.jikometrix.net

     JIKOmetrix - Reliable web hosting


On Jun 26, 2006, at 10:16 AM, arlenejakka wrote:

> I have inherited a site from an experienced programmer (myself a super
> newbie)and now have to try and understand what he was doing plus make
> changes! I know that the intention is to get the date from a database
> that has the date set as a regular date 'Y-M-D' and change it to an
> array so that a countdown can be performed, my question is how do I
> then take the actual date from the data base and convert it into the
> array. For now he had simply put an actual date to test if the
> countdown was working (it is) with this (line$deliveryDate =
> array('M'=>5, 'D'=>25, 'Y'=>2006);)
>
> Any help would be much appreciated!
>
>
> <? define('DEBUG_THIS', 1);
>       define('My_TIME_LIMIT', 75)
>  ?>
>   <h5>File a Claim</h5>
>   <p><strong>NOTE: Before filling out our online claim forms, please
> disable pop-up blockers, so a new window can open containing your
> printable PDF document.</strong></p>
> <?  if(formNotSubmitted() or DEBUG_THIS){
> if(DEBUG_THIS){
>        $deliveryDate = array('M'=>5, 'D'=>25, 'Y'=>2006);     
>       if(!formNotSubmitted()) echo '<p class="ERROR">You are seeing this
> section even though we already have your form because DEBUG_THIS is
> enabled</p>';}
>
> ?>
>         <p>You have <?= CLAIM_TIME_LIMIT ?> days from your delivery date to
> file your Form.<br />Your delivery date was <?= "{$deliveryDate['M']}
> / {$deliveryDate['D']} / {$deliveryDate['Y']}"?><br />
>  <?
>  $secPerDay = 24 * 3600;
>  $secondsLeft = My_TIME_LIMIT * $secPerDay;
> // $daysLeft =  mktime (11, 0, 0, $deliveryDate[M], $deliveryDate[D],
> $deliveryDate[Y]);
>  $secondsLeft -= (time() - mktime (23, 0, 0, $deliveryDate['M'],
> $deliveryDate['D'], $deliveryDate['Y']));
>  $daysLeft = floor($secondsLeft / $secPerDay);
>
>  if(0 <= $daysLeft and $daysLeft <= CLAIM_TIME_LIMIT + 1){
>
>       echo "<strong> You have $daysLeft more days left to begin the
> process.</strong></p>";
>       echo '<p>All info originates from the Form . Please <a id="my_form"
> href="index.php?module=my_form">click here to fill out the Form
> </a>.</p>';
>   } else if($deliveryDate){
>       echo "<strong>More than ";
>       echo CLAIM_TIME_LIMIT;
>       echo " days have passed since your item was delivered, so it is too
> late to file my_form.</strong>";
>       }
>  } // end if formNotSubmitted
> include('replace_info.php');
> ?>
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor -------------------- 
> ~-->
> Something is new at Yahoo! Groups.  Check out the enhanced email  
> design.
> http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/CefplB/TM
> -------------------------------------------------------------------- 
> ~->
>
> The php_mysql group is dedicated to learn more about the PHP/MySQL  
> web database possibilities through group learning.
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to