this is prolly too simple but i got a brain block
i have two arrays, one is days[1-7] and the other is
timeofday[a-l],<each letter represents a time on the hour>
how do is sort by days and put each day's list in order of time?
so that i get a list in order of days and each day is in order of
time...i can put in order by day or time but they always end up with
whatever is the other order wrong.
if ( isset($_GET['sort']) && $_GET['sort']=='call_days' ) {
$_SESSION['sort'] = 'call_days'; }
if ( isset($_GET['sort']) && $_GET['sort']=='call_time' ) {
$_SESSION['sort'] = 'call_time'; }
and:
<?php if ($_SESSION['sort']!='call_time') { echo '<a
href="',$_SERVER['PHP_SELF'],'?sort=call_time">Call Time</a>'; } else {
echo 'Call Time ↓'; } ?>
<?php if ($_SESSION['sort']!='call_days') { echo '<a
href="',$_SERVER['PHP_SELF'],'?sort=call_days">Call Days</a>'; } else {
echo 'Call Days ↓'; } ?>
:-)^2 3 1832
I noticed that Message-ID:
<mB*******************@bignews4.bellsouth.net> from Terry Richards
contained the following: i have two arrays, one is days[1-7] and the other is timeofday[a-l],<each letter represents a time on the hour> how do is sort by days and put each day's list in order of time? so that i get a list in order of days and each day is in order of time...i can put in order by day or time but they always end up with whatever is the other order wrong.
if ( isset($_GET['sort']) && $_GET['sort']=='call_days' ) { $_SESSION['sort'] = 'call_days'; }
if ( isset($_GET['sort']) && $_GET['sort']=='call_time' ) { $_SESSION['sort'] = 'call_time'; }
and:
<?php if ($_SESSION['sort']!='call_time') { echo '<a href="',$_SERVER['PHP_SELF'],'?sort=call_time">Call Time</a>'; } else { echo 'Call Time ↓'; } ?>
<?php if ($_SESSION['sort']!='call_days') { echo '<a href="',$_SERVER['PHP_SELF'],'?sort=call_days">Call Days</a>'; } else { echo 'Call Days ↓'; } ?>
Maybe I have brain block too but that code seems to have nothing to do
with the question.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Geoff Berrow wrote: I noticed that Message-ID: <mB*******************@bignews4.bellsouth.net> from Terry Richards contained the following:
i have two arrays, one is days[1-7] and the other is timeofday[a-l],<each letter represents a time on the hour> how do is sort by days and put each day's list in order of time? so that i get a list in order of days and each day is in order of time...i can put in order by day or time but they always end up with whatever is the other order wrong.
if ( isset($_GET['sort']) && $_GET['sort']=='call_days' ) { $_SESSION['sort'] = 'call_days'; }
if ( isset($_GET['sort']) && $_GET['sort']=='call_time' ) { $_SESSION['sort'] = 'call_time'; }
and:
<?php if ($_SESSION['sort']!='call_time') { echo '<a href="',$_SERVER['PHP_SELF'],'?sort=call_time">Call Time</a>'; } else { echo 'Call Time ↓'; } ?>
<?php if ($_SESSION['sort']!='call_days') { echo '<a href="',$_SERVER['PHP_SELF'],'?sort=call_days">Call Days</a>'; } else { echo 'Call Days ↓'; } ?>
Maybe I have brain block too but that code seems to have nothing to do with the question.
well now, what i am looking to do is explained as best as i can. what
does this code do? i am thinking i need to do for each day:
(day[1-7])(time[a-l])starting with day1-a getting a total of 72
interations ending with (day7-l)
:-)^2
Terry Richards wrote: Geoff Berrow wrote:
I noticed that Message-ID: <mB*******************@bignews4.bellsouth.net> from Terry Richards contained the following:
i have two arrays, one is days[1-7] and the other is timeofday[a-l],<each letter represents a time on the hour> how do is sort by days and put each day's list in order of time? so that i get a list in order of days and each day is in order of time...i can put in order by day or time but they always end up with whatever is the other order wrong.
if ( isset($_GET['sort']) && $_GET['sort']=='call_days' ) { $_SESSION['sort'] = 'call_days'; }
if ( isset($_GET['sort']) && $_GET['sort']=='call_time' ) { $_SESSION['sort'] = 'call_time'; }
and:
<?php if ($_SESSION['sort']!='call_time') { echo '<a href="',$_SERVER['PHP_SELF'],'?sort=call_time">Call Time</a>'; } else { echo 'Call Time ↓'; } ?>
<?php if ($_SESSION['sort']!='call_days') { echo '<a href="',$_SERVER['PHP_SELF'],'?sort=call_days">Call Days</a>'; } else { echo 'Call Days ↓'; } ?> Maybe I have brain block too but that code seems to have nothing to do with the question.
well now, what i am looking to do is explained as best as i can. what does this code do? i am thinking i need to do for each day: (day[1-7])(time[a-l])starting with day1-a getting a total of 72 interations ending with (day7-l)
That makes it clear as a pint of Guiness... Show us the code that (1)
loads the arrays and (2) sorts them.
NM
--
convert uppercase WORDS to single keystrokes to reply This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paul Kirby |
last post by:
Hello All
I am trying to update me code to use arrays to store a group of information
and I have come up with a problem sorting the multiple array :(
Array trying to sort: (7 arrays put into...
|
by: Federico G. Babelis |
last post by:
Hi All:
I have this line of code, but the syntax check in VB.NET 2003 and also in
VB.NET 2005 Beta 2 shows as unknown:
Dim local4 As Byte
Fixed(local4 = AddressOf dest(offset))
...
|
by: mike |
last post by:
If I had a date in the format "01-Jan-05" it does not sort properly
with my sort routine:
function compareDate(a,b)
{
var date_a = new Date(a);
var date_b = new Date(b);
if (date_a < date_b)...
|
by: Karin Jensen |
last post by:
Hi
I am running a PHP program that connects to an Access 2000 database
via ODBC:
$results = odbc_exec($connection_id, $sql_select);
Is it possible to sort the contents of $results? I wish to...
|
by: aruna |
last post by:
Given a set of integers, how to write a program in C
to sort these set of integers using C, given the following conditions
a. Do not use arrays
b. Do not use any comparison function like if/then...
|
by: yatindran |
last post by:
hai
this is my 2d array.
int a = {
{5,2,20,1,30,10},
{23,15,7,9,11,3},
{40,50,34,24,14,4},
{9,10,11,12,13,14},
{31,4,18,8,27,17},
{44,32,13,19,41,19},
{1,2,3,4,5,6},
|
by: Roy Gourgi |
last post by:
Hi,
How would I sort an array?
TIA
Roy
|
by: SneakyElf |
last post by:
i am very green with c++ so i get stuck on very simple things
anyway, i need to write a program that would
read data from file (containing names of tv shows and their networks)
one line at a time...
|
by: KevinADC |
last post by:
If you are entirely unfamiliar with using Perl to sort data, read the "Sorting Data with Perl - Part One and Two" articles before reading this article. Beginning Perl coders may find this article...
|
by: lemlimlee |
last post by:
hello,
this is the task i need to do:
For this task, you are to develop a Java program that allows a user to search or sort an array of numbers using an algorithm that the user chooses. The...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |