PHP object


SUBMITTED BY: henry1874w

DATE: June 4, 2017, 8:18 p.m.

FORMAT: Text only

SIZE: 233 Bytes

HITS: 349

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. class Car {
  6. function Car() {
  7. $this->model = "VW";
  8. }
  9. }
  10. // create an object
  11. $herbie = new Car();
  12. // show object properties
  13. echo $herbie->model;
  14. ?>
  15. </body>
  16. </html>

comments powered by Disqus