Re: Temperature Script
From: Jari (not_at_here.fi)
Date: 01/05/04
- Next message: CountScubula: "Re: Temperature Script"
- Previous message: CountScubula: "Re: Temperature Script"
- In reply to: CountScubula: "Re: Temperature Script"
- Next in thread: CountScubula: "Re: Temperature Script"
- Reply: CountScubula: "Re: Temperature Script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 5 Jan 2004 14:06:56 +0200
I have this function which prints out 5 so it's
the first line with that date.. Can this be used
to get all of them?
======function======
function array_search_bit($search, $yDate)
{
foreach ($yDate as $key => $value)
{
if (strpos($value, $search) !== FALSE)
return $key;
}
return FALSE;
}
$searchkey = array_search("05.01.2004", $yDate);
print "<br>$searchkey";
======function======
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:I%bKb.6512$Mx7.5205@newssvr29.news.prodigy.com...
> "Jari" <not@here.fi> wrote in message news:btbhk0$ald$1@news.cc.tut.fi...
> > Thanks CountScubula.
> >
> your welcome
>
> > Now i need it to make arrays from the fifth day records like this:
> > $todayDate = "05.01.2004";
> > $todayTime = array(07:38:58, 09:33:19);
> > $todayTemp = array(-4.06, -4.50);
> >
> >
> > Thanks,
> > Jari
> >
> > ========outdoor.php========
> > /* outdoor.txt
> > Date; Time; Temp °C
> > 21.11.2003; 18:21:39; -2.69
> > 24.12.2003; 23:10:45; 0.06
> > 01.01.2004; 00:00:29; -5.75
> > 01.01.2004; 00:43:37; -6.13
> > 03.01.2004; 22:13:38; -8.44
> > 05.01.2004; 07:38:58; -4.06
> > 05.01.2004; 09:33:19; -4.50
> > */
> >
>
> Ok, its a little hard to understand your question with only a simple data
> example, I can take this two ways
>
> you want to take first time for day, and time of next day? just two items?
> > $todayTime = array(07:38:58, 09:33:19);
> > $todayTemp = array(-4.06, -4.50);
>
> or is it like this:
> $todayTime = array of times for a given date?
> $todayTemp = array of temps for a given date?
>
> you see, the problem is, you know what you are trying to do, so your
> questions seem simple, to me, I have no idea what you want to do with the
> data, so I see something like $todayTemp = array(-4.06, -4.50); and I
thnink
> you only want 2 items in the array? or is it all items on that date?
>
> just a tip, when posting a question, it is great that you show code and
file
> data, but please, explain how/why you want the data.
>
> a better way to ask would be like this:
>
> I need two items in this array like this
> $todayTime = array(07:38:58, 09:33:19);
>
> or
> need list of all items for that date
> $todayTime = array(07:38:58, 09:33:19);
>
> please don't take this offensively, this is just becouse I do not clearly
> understand the question.
>
> --
> Mike Bradley
> http://www.gzentools.com -- free online php tools
>
>
- Next message: CountScubula: "Re: Temperature Script"
- Previous message: CountScubula: "Re: Temperature Script"
- In reply to: CountScubula: "Re: Temperature Script"
- Next in thread: CountScubula: "Re: Temperature Script"
- Reply: CountScubula: "Re: Temperature Script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|