Tag: php

  • PHP CheatSheet

    Enable Error Display in PHP PDO CheatSheet This section includes cheatsheet of PDO. PHP PDO execute() returning duplicate results This can be solved by using FETCH_ASSOC with both fetch() or fetchAll() function. Note that you might need to use \PDO depending upon namespacing in your project, especially if it gives fatal error. PDO::FETCH_ASSOC not working […]

  • PHP OOP Concepts CheatSheet

    What is a class property A class property is just like a variable, but declared inside a class (at base level, not inside a function / method). For example: What is a class method Method is simply a function inside a class. For example: PHP OOP Encapsulation Encapsulation simply means making the data private and […]