Re: [PHP] Re: Broken data within an Array

2004-09-01 Thread Comex
That still makes no sense..

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Broken data within an Array

2004-09-01 Thread zareef ahmed

> 
> > Following the query I have this:
> > 
> >  > {
> >  $DateAdvertised=$row["DateAdvertised"];
> >   $DateAdvertisedBroken = explode("-",
> $DateAdvertised);
> > 


This should be like this 

http://www.zasaifi.com




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Broken data within an Array

2004-09-01 Thread David Robley
On Wed, 1 Sep 2004 16:51, Harlequin wrote:

> Following the query I have this:
> 
>  {
>  $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... :|
> 

You are subtracting the values Presumably you really want to concatenate
the values, sepearated by dashes, as a string?

-- 
David Robley

Make like a shepherd and get the flock out of here.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Broken data within an Array

2004-09-01 Thread Harlequin
Following the query I have this:

 wrote in message
news:[EMAIL PROTECTED]
> 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
> -

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Broken data within an Array

2004-09-01 Thread Harlequin
while($result = mysql_fetch_array($query))
{
 $DateAdvertised=$row["DateAdvertised"];

does that help any o would you like all the code...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
"Comex" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What is $result?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Broken data within an Array

2004-08-31 Thread Comex
What is $result?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Broken data within an Array

2004-08-31 Thread Harlequin
Jason

Thanks for the response.

I have this:

$DateAdvertised=$row["DateAdvertised"];
 $DateAdvertisedBroken = explode("-", $DateAdvertised);

So I can easily use this in my table:

$result[DateAdvertised]

But not this for some reason:

$DateAdvertisedBroken[n]

Any ideas...?


-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
"Jason Barnett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Harlequin wrote:
>
> > Hi all.
> >
> > Having a problem echoing a broken date. Here's where I'm at:
> >
> > $DateAdvertisedBroken = explode("-", $DateAdvertised);
>
> So this contains an array of (year, month, day) or something similar?  You
> should be able to grab the values here if that's the case.
>
> >
> > later, in a table, I use:
> >
> > $result[DateAdvertised]
> >
> > How can I change this so I can call the broken date...?
>
> implode(' ', $DateAdvertisedBroken)
> or use   if needed.
> Or did you mean $DateAdvetisedBroken[2] ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Broken data within an Array

2004-08-31 Thread Jason Barnett
Harlequin wrote:
Hi all.
Having a problem echoing a broken date. Here's where I'm at:
$DateAdvertisedBroken = explode("-", $DateAdvertised);
So this contains an array of (year, month, day) or something similar?  You 
should be able to grab the values here if that's the case.

later, in a table, I use:
$result[DateAdvertised]
How can I change this so I can call the broken date...?
implode(' ', $DateAdvertisedBroken)
or use   if needed.
Or did you mean $DateAdvetisedBroken[2] ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php