We can use print_r funciton which returns variables in human readable format. Using sizeof function to display all elements using for loop $a= array("Three", "two", "Four", "five","ten") įor($i=0 $i85,"Raju"=>75,"Alex"=>48,"Ronald"=>52) Įcho $mark // Output is 48 Using print_r Looping Through Multi-Dimensional Array in PHP. The following is untested and is off the top of my head (and probably therefore not as thought through as it should be). Here is the code to create and display the value of Youre best using the foreach construct to loop over your array.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |