Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. array(2406) {
  2. [0]=>
  3. array(2) {
  4. ["brand"]=>
  5. string(4) "Mazda"
  6. ["model"]=>
  7. string(9) "CX-4"
  8. }
  9. [1]=>
  10. array(2) {
  11. ["brand"]=>
  12. string(4) "Mazda"
  13. ["model"]=>
  14. string(19) "CX-5"
  15. }
  16.  
  17. [...]
  18.  
  19. [120]=>
  20. array(2) {
  21. ["brand"]=>
  22. string(12) "Mercedes"
  23. ["model"]=>
  24. string(10) "E-class"
  25. }
  26. [121]=>
  27. array(2) {
  28. ["brand"]=>
  29. string(12) "Mercedes"
  30. ["model"]=>
  31. string(10) "S-class"
  32. }
  33. [122]=>
  34. array(2) {
  35. ["brand"]=>
  36. string(9) "Volkswagen"
  37. ["model"]=>
  38. string(10) "Golf"
  39. }
  40. [123]=>
  41. array(2) {
  42. ["brand"]=>
  43. string(9) "Volkswagen"
  44. ["model"]=>
  45. string(10) "Polo"
  46. }
  47. [124]=>
  48. array(2) {
  49. ["brand"]=>
  50. string(9) "Volkswagen"
  51. ["model"]=>
  52. string(10) "Touareg"
  53. }
  54. }
  55.  
  56. "Mazda" : { // the brand
  57. "CX-4",// the list of brand’s models
  58. "CX-5",
  59. },
  60. "Mercedes" : {
  61. "E-class",
  62. "S-class",
  63. },
  64. "Volkswagen" : {
  65. "Golf",
  66. "Polo",
  67. "Touareg",
  68. },
  69.  
  70. foreach($row as $brand => $key){
  71. echo ""$brand" : {n";
  72. print $key[model];
  73.  
  74. echo "},n";
  75. }
  76.  
  77. "Mazda" : {
  78. CX-4},
  79. "Mercedes" : {
  80. E-class},
  81. "Volskwagen" : {
  82. Golf},
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement