Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
PHP
Create an associative array that has at least 10 keylelement pairs.
а.
b. Print out the array , printing out keys and values.
d. Look at your array. Come up with some criterion about elements in your
array, so that about half the elements meet the criterion and half don't. For
example, if your elements are strings, your criterion might be (<
"kangaroo"), or if your elements are numbers, your criterion might be (>
89)! Print out only those array elements that meet the criterion. Put the
criterion in a php comment before the code so that I can see it!
Sort the array (using a function call
yourself!!!) Look up the sort function and the asort function
in www.php.net. Print out the sorted array in table form, printing out keys
and values.
do not write the sorting code
--
е.
comman
unset the fourth element in the sorted array (use the unset function, look it
up on www.php.net)
g. Print out the reverse sorted array in table form, printing out keys and
values. Look up rsort and arsort on www.php.net
h. Print out the array sorted by KEY value in table form, (look up other sort
functions) printing out keys and values.
use the array_rand function to print out 3 random elements of the array.
Remember that every time you refresh your page, these will be different
j. Add 5 new elements to the array and print them out again
f.
i.
expand button
Transcribed Image Text:Create an associative array that has at least 10 keylelement pairs. а. b. Print out the array , printing out keys and values. d. Look at your array. Come up with some criterion about elements in your array, so that about half the elements meet the criterion and half don't. For example, if your elements are strings, your criterion might be (< "kangaroo"), or if your elements are numbers, your criterion might be (> 89)! Print out only those array elements that meet the criterion. Put the criterion in a php comment before the code so that I can see it! Sort the array (using a function call yourself!!!) Look up the sort function and the asort function in www.php.net. Print out the sorted array in table form, printing out keys and values. do not write the sorting code -- е. comman unset the fourth element in the sorted array (use the unset function, look it up on www.php.net) g. Print out the reverse sorted array in table form, printing out keys and values. Look up rsort and arsort on www.php.net h. Print out the array sorted by KEY value in table form, (look up other sort functions) printing out keys and values. use the array_rand function to print out 3 random elements of the array. Remember that every time you refresh your page, these will be different j. Add 5 new elements to the array and print them out again f. i.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education