473,549 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Array help

Hello all!

Going Nuts with this array.
My goal is to have a time system report on delinquent time that looks like
this.

Tom Doe
To*@workplace.c om.

Entered: 0
Hour(s) on: 2005-02-02

Entered: 0
Hour(s) on: 2005-02-01

*************** **

Jane Doe
ja**@workplace. com.

Entered: 0
Hour(s) on: 2005-02-02

Entered: 0
Hour(s) on: 2005-02-03
>>>>>>>>>>> >>>>>>>
What I'm getting is this

Ja**@workplace. com.
You have entered insufficient time on:
Employee: Jane Doe
Entered: 0
Hour(s) on: 2005-02-01
To*@workplace.c om.
You have entered insufficient time on:
Employee: Tom Doe
Entered: 0
Hour(s) on: 2005-02-01
Ha***@workplace .com.
You have entered insufficient time on:
Employee: Harry Doe
Entered: 0
Hour(s) on: 2005-02-02
Ja**@workplace. com.
You have entered insufficient time on:
Employee: Jane Doe
Entered: 0
Hour(s) on: 2005-02-02
To*@workplace.c om.
You have entered insufficient time on:
Employee: Tom Doe
Entered: 0
Hour(s) on: 2005-02-02
>>>>>>>> >>>>>>>>>>


My code after the sql returns is:

while($row = $result->fetchRow(DB_FE TCHMODE_ASSOC)) {

$email = $row['EmployeeID'] . "@workplace.com ";

$firstname=$row['FirstName'];

$lastname=$row['LastName'];

$fullname = $row['FirstName'] . " ". $row['LastName'];

$duration=$row['Duration'];

$day=$row['_Date'];
// if they have entered less than 8 hours, push them into
reporting array

if ($duration < 8){
// send report to offending individual

$individualNoti ce["$email"] = array();
array_push($ind ividualNotice["$email"], " Employee: " . $fullname, "
Entered: " . $duration, " Hour(s) on: " . $day, "\n");

foreach( $individualNoti ce as $email=>$infos )
{

echo ' <li><b>'.$email ."</b>.<br />\n";
echo " You have entered insufficient time on: </li>\n";
echo " <ul>\n";
$infos; // sorts the list of info

foreach( $infos as $info )
{
echo $info . '<br>';
}
echo " </ul>\n";

}

echo "</ol>\n";

}

Any help would be greatly appreciated.
Thanks in advance!
BZ

Jul 17 '05 #1
1 1621

"ZMAN" <vz******@veriz on.net> wrote in message
news:VUTOd.2467 2$uc.17602@trnd dc09...
Hello all!

Going Nuts with this array.
My goal is to have a time system report on delinquent time that looks like
this.

Tom Doe
To*@workplace.c om.

Entered: 0
Hour(s) on: 2005-02-02

Entered: 0
Hour(s) on: 2005-02-01

*************** **

Jane Doe
ja**@workplace. com.

Entered: 0
Hour(s) on: 2005-02-02

Entered: 0
Hour(s) on: 2005-02-03


Use an ORDER BY clause to sort the results from the query by name first,
then print out the name/email only when it's different from the current one.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
906
by: point | last post by:
Hi there.. I have the folowing array => property = hexonet => property = 2003-12-01 18:46:20.0 => property = hexonet => property = 2003-12-02 02:59:15.0 => property = hexonet => property = 2004-12-01 18:46:20.0
2
1556
by: Antti Nummiaho | last post by:
Consider the following javascript: var temp = new Array(new Array(0)) document.writeln(temp) temp = new Array(new Array(0,1)) document.writeln(temp) One would assume that it would print "0 0" that is the first elements of the arrays, but it prints "undefined 0". Why does temp return
8
2098
by: Gactimus | last post by:
I made the program below. It outputs the smallest number in the array. What I would like to know is how do I output the array location. I am at a loss. For example, since the smallest number in the array is 2, the output should be 2 for the number and 1 for the location. If anyone could help or point me in the right direction that would be...
7
25153
by: ritchie | last post by:
Hi all, I am new to this group and I have question that you may be able to help me with. I am trying to learn C but am currently stuck on this. First of all, I have a function for each sort (Bubble, insertion, selection..). I have an array of int's and am passing them to each sort function.
5
2193
by: ritchie | last post by:
Hi, I am writing to ask if anyone can see why my array is not being sorted correctly? It's an array of 4 elements(ints 1,2,3,4) but after calling the selection sort it comes back sorted as 1,1,2,4. I have narrowed it down to the sort function. I'm almost positive
8
10698
by: intrepid_dw | last post by:
Hello, all. I've created a C# dll that contains, among other things, two functions dealing with byte arrays. The first is a function that returns a byte array, and the other is intended to receive a byte array as one of its parameters. The project is marked for COM interop, and that all proceeds normally. When I reference the type...
3
8885
by: George | last post by:
Sub ExcelToListBox() Dim xRange As Object Dim ary Dim xValue As String xRange = oXL.Range("A1:A9") 'has letters A-H ary = xRange.value xValue = ary(3, 1) 'xValue = C Me.ListBoxPerson.Items.AddRange(ary)
3
3724
by: inkexit | last post by:
I need help figuring out what is wrong with my code. I posted here a few weeks ago with some code about creating self similar melodies in music. The coding style I'm being taught is apparently a lot different from what the pros around here use. I really need help with debugging some program errors more than anything, even though my coding...
23
7371
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these in an array. The application compiles but aborts without giving me any useful information. What I suspect is happening is infinite recursion....
5
1549
by: fluk | last post by:
Hi Guys, I hope someone can help me with this, because i'm getting crazy to find a good way to do that! This is what I got by querying a db. $arr1 = array("site", "description", "area1" , "activity1"); $arr2 = array("site", "description", "area1" , "activity2"); $arr3 = array("site", "description", "area2" , "activity2"); $arr4 =...
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7450
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.