Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1.  
  2. class asd
  3. {
  4. private $campaigns = array();
  5.  
  6. public function addCampaign($zxc)
  7. {
  8. $this->campaigns[] = $zxc;
  9. }
  10.  
  11. public function toArray()
  12. {
  13. echo '#';
  14. return $this->campaigns;
  15. }
  16. }
  17.  
  18. $asd = new asd();
  19. $asd->addCampaign(1);
  20. $asd->addCampaign(2);
  21. $asd->addCampaign(3);
  22.  
  23. foreach($asd->toArray() as $a)
  24. {
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement