Re: Broken data within an Array
| From: | Harlequin | Date: | Wed, 01 Sep 2004 07:21:42 +0000 |
| Subject: | Re: Broken data within an Array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195370@lists.php.net to get a copy of this message | ||
Following the query I have this:
<?php while($result = mysql_fetch_array($query))
{
$DateAdvertised=$row["DateAdvertised"];
$DateAdvertisedBroken = explode("-", $DateAdvertised);
Then a little while later this:
$DateAdvertisedBroken[2]-$DateAdvertisedBroken[1]-$DateAdvertisedBroken[0]
which returns nothing, but should as $DateAdvertised does... :|
--
-----------------------------
Michael Mason
Arras People
www.arraspeople.co.uk
-----------------------------
"Harlequin" <michael.mason@arraspeople.co.uk> wrote in message
news:20040831184421.72592.qmail@pb1.pair.com...
> Hi all.
>
> Having a problem echoing a broken date. Here's where I'm at:
>
> $DateAdvertisedBroken = explode("-", $DateAdvertised);
>
> later, in a table, I use:
>
> $result[DateAdvertised]
>
> How can I change this so I can call the broken date...?
>
> I've tried datebroken [2] etc but no joy.
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------