Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Script to write for employee salary Post 303046336 by vbe on Friday 1st of May 2020 03:45:12 AM
Old 05-01-2020
Post closed
Please post in appropriate room, this looks like homework, there are special rules that apply
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Should I write a PERL Script or Shell Script?

Hello, I have done some BASIC shell scripting/PERL scripting before so I am familiar with the languages. I am not really sure which one would lend itself better to the application I have to write. I am required to scan the message logs for possible break in attempts. If I use shell scripting... (2 Replies)
Discussion started by: mojoman
2 Replies

2. What is on Your Mind?

do mind posting ur salary, location(not detailed), job field, work years here

do mind posting ur salary, location(not detailed), job field, work years here I dont you whether you guys are from different countries...but i guess most of you are from different countries, but all in all, we are acting as an ITer.... I just wanto know more about you never mind:p (0 Replies)
Discussion started by: macroideal
0 Replies

3. What is on Your Mind?

AIX Admin Salary

I am interested how much is average AIX Admin Salary.. in the USA or in the EUROPE.. or somewhere else... ;) (6 Replies)
Discussion started by: wwwzviadi
6 Replies

4. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

5. What is on Your Mind?

Monthly Salary in India for Web Programmer?

Anyone know the normal and average monthly salary (and hourly wage for part time) for a solid Web Development in India? Basic requirements. LAMP (Linux, Apache, MySQL, PHP), HTML, CSS, Javascript. vBulletin a plus, but not necessary. Anyone have any idea? (5 Replies)
Discussion started by: Neo
5 Replies

6. What is on Your Mind?

Fresher Salary Details for Redhat Certified System Administrator

I am thinking of doing Redhat certified system Administrator Course(RHCSA).what is the salary details after doing this course in india,Singapore? (0 Replies)
Discussion started by: rajesh1986
0 Replies

7. Shell Programming and Scripting

Employee records

If there are 2 records for an Employee, How can I choose the one with eff_status = ‘Active' and ignore the eff_status ='Terminated'. if there is only one record, then just write that record regardless of the eff_status. Please assist. (1 Reply)
Discussion started by: Harimalyala
1 Replies

8. Linux

Linux admin salary in the USA

Hello guys, First I apologize for asking non technical question but I am goging to move to the USA and I have 8 year experience as a senior linux admin, I am administering storage subsystems as well. Can you please tell me how much is an average salary for Linux admins? Thanks in advance. (4 Replies)
Discussion started by: Vit0_Corleone
4 Replies

9. Shell Programming and Scripting

Calculate the performance of employee

Hi Guys, I need to determine the employee performance and calculate their salaries based on each quarter Expected output enter the no. of Employee 2 2 Enter Employee Name sam Enter salary 1000 Enter Q1 5 Enter Q2 6 Enter Q3 3 Enter Q4 5 Enter Employee Name anderson Enter salary... (17 Replies)
Discussion started by: rohit_shinez
17 Replies
LIST(3) 								 1								   LIST(3)

list - Assign variables as if they were an array

SYNOPSIS
array list (mixed $var1, [mixed $...]) DESCRIPTION
Like array(3), this is not really a function, but a language construct. list(3) is used to assign a list of variables in one operation. PARAMETERS
o $var1 - A variable. RETURN VALUES
Returns the assigned array. EXAMPLES
Example #1 list(3) examples <?php $info = array('coffee', 'brown', 'caffeine'); // Listing all the variables list($drink, $color, $power) = $info; echo "$drink is $color and $power makes it special. "; // Listing some of them list($drink, , $power) = $info; echo "$drink has $power. "; // Or let's skip to only the third one list( , , $power) = $info; echo "I need $power! "; // list() doesn't work with strings list($bar) = "abcde"; var_dump($bar); // NULL ?> Example #2 An example use of list(3) <table> <tr> <th>Employee name</th> <th>Salary</th> </tr> <?php $result = $pdo->query("SELECT id, name, salary FROM employees"); while (list($id, $name, $salary) = $result->fetch(PDO::FETCH_NUM)) { echo " <tr> " . " <td><a href="info.php?id=$id">$name</a></td> " . " <td>$salary</td> " . " </tr> "; } ?> </table> Example #3 Using nested list(3) <?php list($a, list($b, $c)) = array(1, array(2, 3)); var_dump($a, $b, $c); ?> int(1) int(2) int(3) Example #4 Using list(3) with array indices <?php $info = array('coffee', 'brown', 'caffeine'); list($a[0], $a[1], $a[2]) = $info; var_dump($a); ?> Gives the following output (note the order of the elements compared in which order they were written in the list(3) syntax): array(3) { [2]=> string(8) "caffeine" [1]=> string(5) "brown" [0]=> string(6) "coffee" } NOTES
Warning list(3) assigns the values starting with the right-most parameter. If you are using plain variables, you don't have to worry about this. But if you are using arrays with indices you usually expect the order of the indices in the array the same you wrote in the list(3) from left to right; which it isn't. It's assigned in the reverse order. Warning Modification of the array during list(3) execution (e.g. using list($a, $b) = $b) results in undefined behavior. Note list(3) only works on numerical arrays and assumes the numerical indices start at 0. SEE ALSO
each(3), array(3), extract(3). PHP Documentation Group LIST(3)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy