Guest User

Untitled

a guest
Jun 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. $stmt->bind_result($pageID, $permGrpID, $permGrpName);
  2.  
  3. $arr = array();
  4. while ($r = $stmt->fetch()) {
  5. $arr[] = array("PageID " . $pageID, "PermGrpID " . $permGrpID, "PermGrpName " . $permGrpName); $permGrpName);
  6. }
  7. print_r($arr);
  8.  
  9. outputs this............
  10.  
  11. Array
  12. (
  13. [0] => Array
  14. (
  15. [0] => PageID 1
  16. [1] => PermGrpID 1
  17. [2] => PermGrpName Admin
  18. )
  19.  
  20. [1] => Array
  21. (
  22. [0] => PageID 1
  23. [1] => PermGrpID 2
  24. [2] => PermGrpName WebUser
  25. )
  26.  
  27.  
  28.  
  29. Desired format is .......................
  30.  
  31. Array
  32. (
  33. [0] => Array
  34. (
  35. [PageID] => 1
  36. [PageTitle] => CCOP
  37. [PageDescription] => CCOP Main Page
  38. [PageURI] => /index.php
  39. )
  40.  
  41. [1] => Array
  42. (
  43. [PageID] => 8
  44. [PageTitle] => CCOP Components
  45. [PageDescription] => CCOP Components
  46. [PageURI] => /components.php
  47. )
Add Comment
Please, Sign In to add comment