Page 176 - Open Soource Technologies 304.indd
P. 176

Web Technologies-I



                   Notes         7.10 Review Questions

                                    1.  What are the concepts of multi dimensional array? Define their types with example.

                                    2.  What is the slicing of array? Explain with example.
                                    3.  Write a PHP program to split an array in chunks?
                                    4.  How do we remove and insert elements in array? Explain.
                                    5.  Which functions are used to perform a conversion between array and variables? Give the
                                      suitable example.
                                    6.  What are the different methods for traversing an array?

                                    7.  What is the different between for and foreach? Discuss with example.
                                    8.  How do we sort a multidimensional array?
                                    9.  Define the terms:

                                       (a)  Merging Two Arrays
                                       (b)  Calculating the Sum of an Array
                                       (c)  Filtering Elements from an Array

                                       (d)  Calculating the Difference between Two Arrays
                                   10.  How does arrays are used in different data structures? Explain with example.

                                 Answers to Self Assessment
                                     1.   (c)   2.   (a)      3.  (c)     4.   (b)        5.   (c)
                                     6.   (a)    7.  (a)      8.   (a)

                                 7.11 Further Reading



                                                Learning PHP and MySQL  by Michele E. Davis, Jon Phillips.





                                                http://www.elated.com/articles/php-multidimensional-arrays/

























        170                               LOVELY PROFESSIONAL UNIVERSITY
   171   172   173   174   175   176   177   178   179   180   181