// API callback
related_results_labels_thumbs({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$blogger":"http://schemas.google.com/blogger/2008","xmlns$georss":"http://www.georss.org/georss","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$thr":"http://purl.org/syndication/thread/1.0","id":{"$t":"tag:blogger.com,1999:blog-4095748245355156272"},"updated":{"$t":"2023-12-23T10:10:36.395+05:30"},"category":[{"term":"Howto"},{"term":"Facebook Tips"},{"term":"Facebook Tricks"},{"term":"Blogger Tricks"},{"term":"Best  Tricks"},{"term":"Make Money"},{"term":"Net tips"},{"term":"MYSQL"},{"term":"PHP"},{"term":"Pc Tricks"},{"term":"facebook"},{"term":"free"},{"term":"google"},{"term":"AI"},{"term":"Android"},{"term":"Artificial Intelligence"},{"term":"Best  Tips"},{"term":"ChatGPT"},{"term":"Facebook Timeline"},{"term":"Wechat"},{"term":"recharge"},{"term":"Bard"},{"term":"Blogger Widgets"},{"term":"Chatbot"},{"term":"Free Antivirus n key"},{"term":"OpenAI"},{"term":"Orkut tips"},{"term":"Windows Tricks"},{"term":"computer"},{"term":"internet"},{"term":"tricks"},{"term":"whatsapp"},{"term":"windows"},{"term":"CEO"},{"term":"DATABASE"},{"term":"Earn Tricks"},{"term":"Earn money online"},{"term":"FB Status Updater"},{"term":"Free Call"},{"term":"Mobile Tips"},{"term":"NEWS"},{"term":"Net Funny Tricks"},{"term":"PC Tips"},{"term":"SEO Tips"},{"term":"Safe On Facebook"},{"term":"Sundar Pichai"},{"term":"blog"},{"term":"boot"},{"term":"format"},{"term":"microsoft"},{"term":"youtube"},{"term":"4GSpeed"},{"term":"Abstraction"},{"term":"Alphabet"},{"term":"Apache"},{"term":"Article"},{"term":"Atta Pol"},{"term":"Cash"},{"term":"Content"},{"term":"Encapsulation"},{"term":"Extra income"},{"term":"Flexible work"},{"term":"Free Sms to World"},{"term":"Freelancing"},{"term":"Funny Java Tricks"},{"term":"Gift cards"},{"term":"Hosting"},{"term":"Inheritance"},{"term":"Instagram"},{"term":"James Webb Space Telescope"},{"term":"Java Tricks"},{"term":"LG"},{"term":"Launch"},{"term":"Learn PHP"},{"term":"MVC"},{"term":"MariaDB"},{"term":"Market value"},{"term":"Maximize earning potential"},{"term":"Mobile app"},{"term":"Mobile as a Webcam"},{"term":"NASA"},{"term":"Neal Mohan"},{"term":"OOP"},{"term":"Object-Oriented Programming"},{"term":"Online jobs"},{"term":"Orkut Ha(k"},{"term":"PHP applications"},{"term":"PHP programming"},{"term":"PHP scripts"},{"term":"PayPal"},{"term":"Points"},{"term":"Polymorphism"},{"term":"Post"},{"term":"Remote employees"},{"term":"Remote jobs"},{"term":"Remote work"},{"term":"Remote work culture"},{"term":"Rewards"},{"term":"Search engines"},{"term":"Share price"},{"term":"Spare time"},{"term":"Step-by-step guide"},{"term":"Surveys"},{"term":"Susan Wojcicki"},{"term":"Tasks"},{"term":"Telecommuting"},{"term":"Top Ten Antivirus 2012"},{"term":"Trading"},{"term":"Videos"},{"term":"Virtual work"},{"term":"Web Traffic"},{"term":"Website"},{"term":"Work from home"},{"term":"Wrong answer"},{"term":"XAMPP"},{"term":"bluestacks"},{"term":"bootable pendrive"},{"term":"computer setup"},{"term":"control structures"},{"term":"data types"},{"term":"database connectivity"},{"term":"dynamic content"},{"term":"email"},{"term":"file handling"},{"term":"functions"},{"term":"gadgets"},{"term":"highspeed"},{"term":"hotspot"},{"term":"iOS"},{"term":"installation process"},{"term":"leptop"},{"term":"mobile"},{"term":"navbar"},{"term":"operators"},{"term":"programming"},{"term":"scripting language"},{"term":"software bundle"},{"term":"tool"},{"term":"variables"},{"term":"web applications"},{"term":"web development"},{"term":"web server"},{"term":"wifi"}],"title":{"type":"text","$t":"Get Tricks - All Type of Tricks"},"subtitle":{"type":"html","$t":"The site gives knowledge and tricks about social sites, computer tricks, the Internet and earning money online. All Information and tips are in One Place."},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https:\/\/www.gettrickz.com\/feeds\/posts\/default"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/-\/Howto?alt=json-in-script\u0026max-results=5"},{"rel":"alternate","type":"text/html","href":"https:\/\/www.gettrickz.com\/search\/label\/Howto"},{"rel":"hub","href":"http://pubsubhubbub.appspot.com/"},{"rel":"next","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/-\/Howto\/-\/Howto?alt=json-in-script\u0026start-index=6\u0026max-results=5"}],"author":[{"name":{"$t":"Juber Khan Baloch"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/03500557746501068520"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"https:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"generator":{"version":"7.00","uri":"http://www.blogger.com","$t":"Blogger"},"openSearch$totalResults":{"$t":"20"},"openSearch$startIndex":{"$t":"1"},"openSearch$itemsPerPage":{"$t":"5"},"entry":[{"id":{"$t":"tag:blogger.com,1999:blog-4095748245355156272.post-2722954068589175777"},"published":{"$t":"2023-03-03T13:32:00.003+05:30"},"updated":{"$t":"2023-03-03T13:32:30.217+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Best  Tricks"},{"scheme":"http://www.blogger.com/atom/ns#","term":"facebook"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Howto"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Instagram"},{"scheme":"http://www.blogger.com/atom/ns#","term":"tool"},{"scheme":"http://www.blogger.com/atom/ns#","term":"whatsapp"}],"title":{"type":"text","$t":"How to Send WhatsApp Messages Without Saving Numbers in Your Contacts"},"content":{"type":"html","$t":"\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/baloch.world\/wapp\/\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" target=\"_new\"\u003E\u003Cimg border=\"0\" data-original-height=\"300\" data-original-width=\"300\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjW6hAsaA9X8fftySCCBYA_IckKRt3SjCsqAHb3NLd9eVh5C05u5Jk8tpllfge_sITpTddbt1KohUFLtTCh0cifA4EmHIbxs6ZaQPM7SwJle2RA24woS1RZIkkl6FwOVN0kyplrrmIi_3JeYVzPjHGqymMsUJf_IEm7tEc_AA-6sBJH6EC36t1mj3MDlw\/s16000\/whatsapp-message-to-anyone-without-saving-phone-or-mobile-number.jpg\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cp\u003EWhatsApp is one of the most popular messaging applications in the world, with over 2 billion users. While the app makes it easy to connect with friends, family, and colleagues, it can be a bit inconvenient to save every contact you want to send a message to. Luckily, there are ways to send WhatsApp messages without saving the number in your contacts.\u003C\/p\u003E\u003Cp\u003EOne tool that can help you achieve this is \u003Ca href=\"https:\/\/baloch.world\/wapp\/\" target=\"_new\"\u003EWhatsApp Tool \u003C\/a\u003E, a website that allows you to send WhatsApp messages without having to save the number in your contacts.\u0026nbsp;\u003C\/p\u003E\u003Cp\u003E\u003Cbr \/\u003E\u003C\/p\u003E\u003Ch3\u003E\u003Cb\u003EHere's how to use it:\u003C\/b\u003E\u003C\/h3\u003E\u003Cp\u003E\u003Cb\u003EStep 1: \u003C\/b\u003EVisit the \u003Ca href=\"https:\/\/baloch.world\/wapp\/\" target=\"_new\"\u003EWhatsApp Tool\u003C\/a\u003E website\u003C\/p\u003E\u003Cp\u003EFirst, you need to visit the tool website. You can do this by typing \"\u003Ca href=\"https:\/\/baloch.world\/wapp\/\" target=\"_new\"\u003Ehttps:\/\/baloch.world\/wapp\u003C\/a\u003E\" into your web browser's address bar and pressing enter.\u003C\/p\u003E\u003Cp\u003E\u003Cb\u003EStep 2:\u003C\/b\u003E Enter the number and message\u003C\/p\u003E\u003Cp\u003EOnce you're on the\u0026nbsp;\u003Ca href=\"https:\/\/baloch.world\/wapp\/\" target=\"_new\"\u003EWhatsApp Tool\u003C\/a\u003E, you'll see a form where you can enter the phone number to which you want to send the message, along with the message itself. Simply enter the number and type your message.\u003C\/p\u003E\u003Cp\u003E\u003Cb\u003EStep 3:\u003C\/b\u003E Click the \"Send\" button\u003C\/p\u003E\u003Cp\u003EAfter you've entered the phone number and message, click the \"Send\" button. The website will redirect you to the WhatsApp application, and your message will be ready to send.\u003C\/p\u003E\u003Cp\u003E\u003Cb\u003EStep 4:\u003C\/b\u003E Verify the recipient\u003C\/p\u003E\u003Cp\u003EBefore you send the message, it's always a good idea to verify that you're sending it to the correct recipient. Double-check the phone number to ensure that you haven't made any mistakes.\u003C\/p\u003E\u003Cp\u003E\u003Cb\u003EStep 5:\u003C\/b\u003E Send the message\u003C\/p\u003E\u003Cp\u003EFinally, click the send button within WhatsApp to send the message to the recipient.\u003C\/p\u003E\u003Cp\u003EUsing\u0026nbsp;\u003Ca href=\"https:\/\/baloch.world\/wapp\/\" target=\"_new\"\u003EWhatsApp Tool\u003C\/a\u003E\u0026nbsp;to send WhatsApp messages without saving the number in your contacts is a quick and easy process that can save you time and effort. With this tool, you can easily send messages to people you don't want to add to your contact lists, such as service providers or people you're only communicating with once.\u003C\/p\u003E\u003Cp\u003Eif you want to send WhatsApp messages without saving the number in your contacts,\u0026nbsp;\u003Ca href=\"https:\/\/baloch.world\/wapp\/\" target=\"_new\"\u003EWhatsApp Tool\u003C\/a\u003E\u0026nbsp;is an excellent tool that can help you achieve this. Simply visit the website, enter the phone number and message, and click send. It's as simple as that!\u003C\/p\u003E\n\u003Ch3 style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/baloch.world\/wapp\/\" target=\"_new\"\u003E\u003Cb\u003ECLICK HERE TO GO TO WhatsApp Tool\u003C\/b\u003E\u003C\/a\u003E\u003C\/h3\u003E"},"link":[{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/2722954068589175777"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/2722954068589175777"},{"rel":"alternate","type":"text/html","href":"https:\/\/www.gettrickz.com\/2023\/03\/how-to-send-whatsapp-messages-without.html","title":"How to Send WhatsApp Messages Without Saving Numbers in Your Contacts"}],"author":[{"name":{"$t":"Juber Khan Baloch"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/03500557746501068520"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"https:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjW6hAsaA9X8fftySCCBYA_IckKRt3SjCsqAHb3NLd9eVh5C05u5Jk8tpllfge_sITpTddbt1KohUFLtTCh0cifA4EmHIbxs6ZaQPM7SwJle2RA24woS1RZIkkl6FwOVN0kyplrrmIi_3JeYVzPjHGqymMsUJf_IEm7tEc_AA-6sBJH6EC36t1mj3MDlw\/s72-c\/whatsapp-message-to-anyone-without-saving-phone-or-mobile-number.jpg","height":"72","width":"72"}},{"id":{"$t":"tag:blogger.com,1999:blog-4095748245355156272.post-1436035524094031151"},"published":{"$t":"2023-02-17T13:28:00.010+05:30"},"updated":{"$t":"2023-02-25T00:14:53.502+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Abstraction"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Encapsulation"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Howto"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Inheritance"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Learn PHP"},{"scheme":"http://www.blogger.com/atom/ns#","term":"MYSQL"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Object-Oriented Programming"},{"scheme":"http://www.blogger.com/atom/ns#","term":"OOP"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PHP"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Polymorphism"}],"title":{"type":"text","$t":" Start Learn PHP\/MYSQL : How to Do Object Oriented Programming(OOP) in PHP( Easy Explained )"},"content":{"type":"html","$t":"\u003Cdiv class=\"separator\" style=\"clear: both;\"\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjbDL56QCWVnfsLzlYPHiit0EwPFYUem83KHaGr_1B9TRWU_AQqpJLUNVAuvz1twgJfzJ_4vYxMsPX7C8sgqNq3SY-_E79jGkDZIFkJnwox5oJwwzKp9B5zWIbyTwuCzx7fvL2YSMMUG23cCAhFWRT4HjXEYmGcAL9x_jJSFuAsh3Y-7hq09CCb1wi02w\/s1024\/Object-Oriented-Programming-in-PHP.jpg\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"\u003E\u003Cimg border=\"0\" data-original-height=\"687\" data-original-width=\"1024\" height=\"215\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjbDL56QCWVnfsLzlYPHiit0EwPFYUem83KHaGr_1B9TRWU_AQqpJLUNVAuvz1twgJfzJ_4vYxMsPX7C8sgqNq3SY-_E79jGkDZIFkJnwox5oJwwzKp9B5zWIbyTwuCzx7fvL2YSMMUG23cCAhFWRT4HjXEYmGcAL9x_jJSFuAsh3Y-7hq09CCb1wi02w\/s320\/Object-Oriented-Programming-in-PHP.jpg\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cp\u003EObject-oriented programming(OOP) is a popular programming model used in present time software development. With OOP, programmers can organize code into reusable, modular components, which makes software development more efficient and easier to maintain. PHP, one of the most popular server side scripting languages,supports OOP concepts and provides developers with powerful tools to create robust and scalable applications.\u003C\/p\u003E\u003Cp\u003EIn this article we will take closer look at oops in PHP and explore benefits it offers to developers.We will also discuss essential OOP concepts and how to use them in PHP programming.\u003C\/p\u003E\n\u003Ch3\u003EWhat is Object-Oriented Programming.(OOP)?\u003C\/h3\u003E\n\u003Cp\u003EObject-Oriented Programming is a programming model that focuses on creating software components that can be reused and combined to create complex\/big applications.OOP is built around the concept of objects which represent real world entities or concepts. An object is a self contained unit that has properties and methods that define its behaviour.\u003C\/p\u003E\n\u003Ch3\u003EPHP and OOP:\u003C\/h3\u003E\n\u003Cp\u003EPHP supports OOP concepts and starting from PHP5 it provides robust support for OOP programming. OOP in PHP enables developers to create complex applications by breaking them down into smaller, reusable components. OOP in PHP allows developers to write more organized and maintainable code which is easier to debug and extend.\u003C\/p\u003E\n\u003Cp\u003EObject-Oriented Programming(OOP) in PHP has a large number of methods and keywords that are used to create classes,objects \u0026 methods.Here are some of most commonly used Object-Oriented Programming methods and keywords in PHP programming:\u003C\/p\u003E\n  \u003Col\u003E\u003Ch4\u003E\u003Cli\u003EMethods:\u003C\/li\u003E\u003C\/h4\u003E\u003C\/ol\u003E\u003Cul\u003E\u003Cli\u003E\u003Cb\u003E__construct()\u003C\/b\u003E:a special method that is automatically called when an object is instantiate.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E__destruct()\u003C\/b\u003E:a special method that is automatically called when an object is destroy.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E__get()\u003C\/b\u003E: a method that is called when an inaccessible property is accessed.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E__set()\u003C\/b\u003E: a method that is called when an inaccessible property is set.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E__call()\u003C\/b\u003E: a method that is called when a not accessible method is called.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Estatic\u003C\/b\u003E: a keyword used to define static methods and properties.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Efinal\u003C\/b\u003E: a keyword used to stop a class from being sub classed or a method from being overridden.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Eabstract\u003C\/b\u003E: a keyword used to define abstract classes \u0026 methods.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Einterface\u003C\/b\u003E: a keyword used to define interfaces.\u003C\/li\u003E\u003C\/ul\u003E\u003Col start=\"2\"\u003E\u003Ch4\u003E\u003Cli\u003EKeywords:\u003C\/li\u003E\u003C\/h4\u003E\u003C\/ol\u003E\u003Cul\u003E\u003Cli\u003E\u003Cb\u003Eclass\u003C\/b\u003E:a keyword used to define a class.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Enew\u003C\/b\u003E:a keyword used to create an object instance of a class.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Eextends \u003C\/b\u003E: a keyword used to define inheritance between classes.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Epublic \u003C\/b\u003E:a keyword used to declare a property\/method as publicly accessible.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Eprivate \u003C\/b\u003E-a keyword used to declare a property or method as accessible only within the class that defines it\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Eprotected \u003C\/b\u003E-a keyword used to declare a property or method as accessible only within the class that defines it and its subclasses\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Ethis \u003C\/b\u003E-a keyword used to refer to the current object instance within a class method\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Eself \u003C\/b\u003E- a keyword used to refer to the current class within a class method\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003Eparent \u003C\/b\u003E- a keyword used to refer to the parent class within a class method\u003C\/li\u003E\u003C\/ul\u003E\u003Cp\u003EThese are just a few of the many methods \u0026 keywords available in OOP in PHP. By understanding and using these methods and keywords effectively, you can create more powerful and efficient object-oriented code.\u003C\/p\u003E\n\u003Ch3\u003EEssential OOP Concepts:\u003C\/h3\u003E\n\u003Col\u003E\u003Ch4\u003E\u003Cli\u003EClasses and Objects:\u003C\/li\u003E\u003C\/h4\u003E\n  \u003Cp\u003EClasses define the blueprint or structure of an object, while objects are instances of a class. A class is a template that defines the properties and methods of an object, while an object is a concrete realization of a class.\u003C\/p\u003E\n  \u003Cp\u003EIn PHP there are three types of classes and objects: regular classes, abstract classes and interfaces.Let's take a look at each of them and their rules.\u003C\/p\u003E\n  \u003Col\u003E\u003Cli\u003E\u003Cstrong\u003ERegular Classes\u003C\/strong\u003E\nRegular classes are the most common type of class in PHP and they can be instantiated to create objects.These classes can have properties and methods, which can be accessed using object notation.\u003C\/li\u003E\u003C\/ol\u003E\u003Cp\u003ERules:\u003C\/p\u003E\u003Cul\u003E\u003Cli\u003ERegular classes must have a class keyword followed by a name and a set of curly braces.\u003C\/li\u003E\u003Cli\u003EClass names should follow CamelCase naming convention.\u003C\/li\u003E\u003Cli\u003EA class must be instantiated before it can be used to create objects.\u003C\/li\u003E\u003Cli\u003EProperties and methods must have an access modifier, which determines their visibility.The three access modifiers are public, protected and private.\u003C\/li\u003E\u003Cli\u003EA class can inherit from another class using the extends keyword.\u003C\/li\u003E\u003C\/ul\u003E\u003Cp\u003EExample:\u003C\/p\u003E\n  \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \nclass Car {\n    public $make;\n    public $model;\n\n    public function start() {\n        \/\/code to start the car\n    }\n\n    private function checkFuel() {\n        \/\/code to check the level of  fuel \n    }\n}\n\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Col start=\"2\"\u003E\u003Cli\u003E\u003Cstrong\u003EAbstract Classes\u003C\/strong\u003E\nAbstract classes are similar to regular classes but they cannot be instantiated on their own. Instead, they are meant to be extended by other classes. Abstract classes can have abstract methods, which are methods without implementation.These methods must be implemented by any class that extends the abstract class.\u003C\/li\u003E\u003C\/ol\u003E\u003Cp\u003ERules:\u003C\/p\u003E\u003Cul\u003E\u003Cli\u003EAbstract classes must have an abstract keyword before the class keyword.\u003C\/li\u003E\u003Cli\u003EAn abstract class cannot be instantiated on its own.\u003C\/li\u003E\u003Cli\u003EAbstract classes can have abstract methods which are declared without an implementation.\u003C\/li\u003E\u003Cli\u003EAny class that extends an abstract class must implement all of its abstract methods.\u003C\/li\u003E\u003C\/ul\u003E\u003Cp\u003EExample:\u003C\/p\u003E\n   \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \nabstract class Vehicle {\n    public $make;\n    public $model;\n\n    abstract public function start();\n}\n\n\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Col start=\"3\"\u003E\u003Cli\u003E\u003Cstrong\u003EInterfaces\u003C\/strong\u003E\nInterfaces are alike to abstract classes but they can only have method signatures and constants.Any class that implements an interface must implement all of its methods. Interfaces are used to define a set of methods that must be implemented by any class that wants to use them.\u003C\/li\u003E\u003C\/ol\u003E\u003Cp\u003ERules: \u003C\/p\u003E\u003Cul\u003E\u003Cli\u003E Interfaces must have an interface keyword followed by a name and a set of curly braces.\u003C\/li\u003E\u003Cli\u003EInterfaces can only have method signatures and constants not properties or method implementations.\u003C\/li\u003E\u003Cli\u003EAny class that implements an interface must implement all of its methods.\u003C\/li\u003E\u003C\/ul\u003E\u003Cp\u003E Example:\u003C\/p\u003E\n \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \ninterface Printable {\n    public function print();\n}\n\n\n\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Cp\u003EIn summary regular classes, abstract classes and interfaces all have different rules and use cases in PHP. Regular classes are the most common and can be instantiated to create objects while abstract classes and interfaces are used for more specialized cases, such as creating blueprints for other classes or defining a set of methods that must be implemented by other classes.\u003C\/p\u003E\n  \n \u003Cp\u003EFull Example of classes and objects in PHP.Imagine we are building a simple website for a library, and we want to create a class for the books that will be displayed on the site.We can create a Book class that will have properties for the title, author, and number of pages.\u003C\/p\u003E\n  \n \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n class Book {  \n   public $title;  \n   public $author;  \n   public $pages;  \n }  \n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \n  \u003Cp\u003EWe can then create object of the BOOK class and set its properties... \u003C\/p\u003E\n   \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n$book1 = new Book();\n$book1-\u0026gt;title = \"To Kill a Mockingbirds\";\n$book1-\u0026gt;author = \"Harry Lee\";\n$book1-\u0026gt;pages = 281;\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Cp\u003EWe can also create additional objects of the BOOK class and set their properties...\u003C\/p\u003E\n   \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n  \n \u0026lt;?php  \n \n$book2 = new Book();\n$book2-\u0026gt;title = \"The Great Gat sby\";\n$book2-\u0026gt;author = \"F. Scott Fitz gerald\";\n$book2-\u0026gt;pages = 180;\n\n$book3 = new Book();\n$book3-\u0026gt;title = \"Pride and Pre judice\";\n$book3-\u0026gt;author = \"Jane Aus\";\n$book3-\u0026gt;pages = 279;\n\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\n  \u003Cp\u003EWe can then display the properties of each object using the echo statement.\u003C\/p\u003E\n  \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \necho $book1-\u0026gt;title; \/\/ Output: To Kill a Mockingbird\necho $book2-\u0026gt;author; \/\/ Output: F. Scott Fitzgerald\necho $book3-\u0026gt;pages; \/\/ Output: 279\n\n\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Cp\u003EWe can also define methods with in the Book class to perform various tasks such as calculating the number of pages read per hour.\u003C\/p\u003E\n   \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \nclass Book {\n    public $title;\n    public $author;\n    public $pages;\n\n    public function readPagesPerHour($hours) {\n        return $this-\u0026gt;pages \/ $hours;\n    }\n}\n\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Cp\u003EWe can then call method on an object of the BOOK class...\u003C\/p\u003E\n  \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n$book1 = new Book();\n$book1-\u0026gt;title = \"To Kill a Mockingbird\";\n$book1-\u0026gt;author = \"Harper Lee\";\n$book1-\u0026gt;pages = 281;\n\necho $book1-\u0026gt;readPagesPerHour(2); \/\/ Output: 140.5\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Cp\u003EAs you can see classes and objects in PHP provide a powerful way to encapsulate data and logic in reusable components. By defining a class, we can create multiple instances of that class (i.e.objects) with their own unique properties and methods.This makes our code more modular and easier to maintain as well as more efficient and scalable.\u003C\/p\u003E\n  \n  \u003Ch4\u003E\u003Cli\u003EEncapsulation:\u003C\/li\u003E\u003C\/h4\u003E\u003Ch4\u003E\n    \u003Cp\u003E\n     Encapsulation is a mechanism that hides the internal details of an object and exposes only the necessary information. It ensures that the data inside an object is not accessible from outside the object. It is an important concept in Object-Oriented Programming(OOP) that allows you to hide the implementation details of a class from the outside world.This helps to prevent accidental modification of class properties and methods and ensures that they are only accessed and modified in a controlled way. In PHP,encapsulation can be achieved using access modifiers such as public, private and protected.\u003C\/p\u003E\n    \u003Col\u003E\u003Ch5\u003E\u003Cli\u003EPublic:\u003C\/li\u003E\u003C\/h5\u003E\u003C\/ol\u003E\u003Cp\u003E\nPublic properties and methods are accessible from anywhere in the code both inside and outside of the class. This means that they can be accessed by objects, functions, and other classes.\u003C\/p\u003E\n      \u003Col start=\"2\"\u003E\u003Ch5\u003E\u003Cli\u003EPrivate : \u003C\/li\u003E\u003C\/h5\u003E\u003C\/ol\u003E\u003Cp\u003E\nPrivate properties and methods are only accessible from with in the class. They cannot be accessed by objects functions or other classes outside of the class. This means that the value of a private property can only be set or retrieved by methods within the same class.\u003C\/p\u003E\n    \u003Col start=\"3\"\u003E\u003Ch5\u003E\u003Cli\u003EProtected : \u003C\/li\u003E\u003C\/h5\u003E\u003C\/ol\u003E\u003Cp\u003E\nProtected properties and methods are only accessible from within the class and its subclasses. This means that they cannot be accessed by objects or functions outside of the class but they can be accessed by subclasses that inherit from the class.\u003C\/p\u003E\n    \n    \u003Cp\u003EHere example of Encapsulation in PHP:\u003C\/p\u003E\n   \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n class BankAccount {  \n   private $balance;  \n   \n   public function deposit($amount) {  \n     $this-\u0026gt;balance += $amount;  \n   }  \n   \n   public function withdraw($amount) {  \n     if ($amount \u0026lt;= $this-\u0026gt;balance) {  \n       $this-\u0026gt;balance -= $amount;  \n     } else {  \n       echo \"Insufficient funds\";  \n     }  \n   }  \n   \n   public function getBalance() {  \n     return $this-\u0026gt;balance;  \n   }  \n }  \n\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n    \u003Cp\u003EIn this example, we define a Bank Account class with a private property $balance and three methods: deposit(), withdraw()and \u003Ccode\u003EgetBalance(). The deposit() method allows a user to add money to their account, while the withdraw() method allows them to remove money from their account. The \u003Ccode\u003EgetBalance()\u003C\/code\u003E method allows them to check their current account balance.\u003C\/p\u003E\n    \u003Cp\u003ENote that the $balance property is marked as private, which means that it can only be accessed within the class itself. This ensures that the balance can only be modified by the deposit() and \u003Ccode\u003Ewithdraw() methods, and cannot be accessed or modified directly from outside the class. This helps to prevent accidental modification of the balance and ensures that it is only accessed and modified in a controlled way.\u003C\/p\u003E\n    \u003Cp\u003EHere an example of how to use the Bank Account class:\u003C\/p\u003E\n    \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n  \n \u0026lt;?php  \n$account = new BankAccount();  \n $account-\u0026gt;deposit(1000);  \n $account-\u0026gt;withdraw(500);  \n echo \"Acc Balance: \" . $account-\u0026gt;getBalance();  \n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n    \u003Cp\u003EIn this example we create a new Bank Account object, deposit 1000 into the account, withdraw 500 from the account, and then print the current balance using the getBalance() method. Note that we can only access the balance using the getBalance() method, and cannot modify it directly.\u003C\/p\u003E\n    \u003Cp\u003EBy encapsulating the balance property and only allowing it to be accessed and modified through controlled methods, we can ensure that the account balance is always accurate and that it cannot be accidentally modified or tampered with.\u003C\/p\u003E\n    \n    \u003C\/h4\u003E\u003Ch4\u003E\u003Cli\u003EInheritance:\u003C\/li\u003E\u003C\/h4\u003E\u003Cp\u003EInheritance is a mechanism that enables one class to inherit properties and methods from another class. Inheritance promotes code reuse, and it simplifies the design and maintenance of complex applications.It is a powerful feature in Object-Oriented Programming (OOP) that allows you to create new classes that are based on existing classes, inheriting their properties and methods. In PHP, you can use the extends keyword to create a subclass that inherits from a parent class.\u003C\/p\u003E\n    \u003Cp\u003EHere example of inheritance in PHP:\u003C\/p\u003E\n     \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n  \u003Ccode\u003E \n \u0026lt;?php  \n \n class Animal {  \n     protected $name;  \n   protected $color;  \n   \n   public function __construct($name, $color) {  \n          $this-\u0026gt;name = $name;  \n     $this-\u0026gt;color = $color;   \n  }  \n   \n   public function eat() {  \n               echo  \"{$this-\u0026gt;name}    eating...\";     }  \n }  \n   \n class Dog extends Animal {  \n   public function bark() {  \n     echo  \"{$this-\u0026gt;name}    barking...\";   } \n }  \n\n ?\u0026gt;  \n  \u003C\/code\u003E\n\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Cp\u003E  In this example we define an Animal class with two protected properties ($name and $color) and a eat() method. We then define a Dog class that extends the Animal class, and adds a bark() method.\n    \u003C\/p\u003E\u003Cp\u003E\nNote that the Dog class uses the extends keyword to inherit from the Animal class.This means that the Dog class will have access to all of the properties and methods of the Animal class, as well as its own bark() method.\u003C\/p\u003E\n    \u003Cp\u003E Here example of how to use the Dog class:\u003C\/p\u003E\n    \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n  \n \u0026lt;?php  \n \n$dog = new Dog('Fido', 'Brown');\n$dog-\u0026gt;eat(); \/\/  Output: Fido eating...\n$dog-\u0026gt;bark(); \/\/  Output: Fido  barking...\n \n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n    \u003Cp\u003EIn this example we create a new DOG object and pass in a name and color to its constructor.We then call its eat() and bark() methods which were inherited from the Animal class and defined in the Dog class respectively.\u003C\/p\u003E\n    \u003Cp\u003EBy using inheritance we can create new classes that are based on existing classes inheriting their properties and methods and adding new functionality. This allows us to write more efficient and reusable code and makes it easier to organize and maintain our programs\u003C\/p\u003E\n    \n  \u003Ch4\u003E\u003Cli\u003EPolymorphism: \u003C\/li\u003E\u003C\/h4\u003E\n    \u003Cp\u003EPolymorphism is the ability of an object to take on different forms or behaviors. In PHP, polymorphism is achieved through method overriding and method overloading.It is an important concept in Object-Oriented Programming (OOP) that allows objects of different classes to be treated as if they were the same type. This is achieved by using inheritance and method overriding, which allows a subclass to provide its own implementation of a method that is already defined in its parent class. In PHP, polymorphism can be achieved using the extends keyword and the override keyword.\u003C\/p\u003E\n    \u003Cp\u003EHere example of polymorphism in PHP:\u003C\/p\u003E\n    \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n class Shape\n {  \n   public function getArea() \n{  \n     return 0;  \n   }  \n }  \n   \n class Circle extends  Shape\n {  \n   private $radius;  \n   \n   public function __construct($radius) \n{  \n     $this-\u0026gt;radius = $radius;  \n }  \n   \n   public function getArea()\n {  \n     return 3.14 * $this-\u0026gt;radius * $this-\u0026gt;radius;  \n               }  \n }  \n   \n class Square extends Shape {  \n   private $length;  \n   \n   public function __construct($length){  \n     $this-\u0026gt;length = $length;  \n                           }  \n   \n   public function getArea() \n{  \n     return $this-\u0026gt;length * $this-\u0026gt;length;     }  \n }  \n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n    \u003Cp\u003EIn this example we define a Shape class with a getArea() method that returns 0.We then define two subclasses: Circle and Square, both of which extend the Shape class and provide their own implementation of the getArea() method. \u003C\/p\u003E \u003Cp\u003E\n\nNote that the getArea() method is defined in the Shape class and overridden in the Circle and Square classes. This allows objects of the Circle and Square classes to be treated as if they were objects of the Shape class because they share the same method signature.\n \u003C\/p\u003E \u003Cp\u003E\nHere example of how to use the Shape, Circle, and Square classes: \u003C\/p\u003E\n   \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n  $shapes = array(  \n   new Circle(5),  \n   new Square(4),  \n   new Circle(3)  \n );  \n   \n foreach ($shapes as $shape){  \n   echo \"Area: \" . $shape-\u0026gt;getArea() . \"\u0026lt;br\u0026gt;\";  \n }  \n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n    \u003Cp\u003EIn this example we create an array of Shape objects that contains two Circle objects and one Square object. We then iterate over the array and call the getArea() method on each object which will call the appropriate implementation of the method in each subclass.\u003C\/p\u003E\n    \u003Cp\u003EBy using polymorphism we can write more flexible and extensible code that can be easily adapted to different situations. This allows us to write code that is more maintainable, reusable and efficient and makes it easier to add new functionality to our programs.\u003C\/p\u003E\n    \n    \u003Ch4\u003E\u003Cli\u003EAbstraction: \u003C\/li\u003E\u003C\/h4\u003E\n    \u003Cp\u003EAbstraction is a mechanism that allows developers to create generalized models of realworld entities \/ concepts. It helps to reduce complexity and increase the reusability of code.It is an important concept in Object-Oriented Programming (OOP) that allows us to hide the implementation details of a class from its users, while still providing a clear and concise interface for interacting with that class. In PHP we can achieve abstraction by using abstract classes and abstract methods.\u003C\/p\u003E\n    \u003Cp\u003EHere example of abstraction in PHP:\u003C\/p\u003E\n     \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n abstract class  Shape {  \n   protected $color;  \n   \n   public function __construct($color)   {  \n     $this-\u0026gt;color = $color;  \n   }  \n   \n   public function getColor() {  \n     return  $this-\u0026gt;color;  \n   }  \n   abstract public function getArea();  \n }  \n \n class Circle extends Shape {  \n   private $radius;  \n   public function __construct($color, $radius)\n {  \n     parent::__construct($color);  \n     $this-\u0026gt;radius = $radius;  \n }  \n   public function getArea() {  \n     return 3.14 * $this-\u0026gt;radius * $this-\u0026gt;radius; \n}  \n }  \n class Square extends Shape {  \n   private   $length;  \n   public function __construct($color, $length) {  \n     parent::__construct($color);  \n     $this-\u0026gt;length = $length;  \n   }     \n   public function getArea() {  \n     return $this-\u0026gt;length * $this-\u0026gt;length;  \n   }  \n }  \n   \n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n    \u003Cp\u003EIn this example we define a Shape class with a getArea() method that returns 0. We then define two subclasses: Circle and Square, both of which extend the Shape class and provide their own implementation of the getArea() method.\n    \u003C\/p\u003E\u003Cp\u003E\nNote that the getArea() method is defined in the Shape class and overridden in the Circle and Square classes. This allows objects of the Circle and Square classes to be treated as if they were objects of the Shape class because they share the same method signature.\n    \u003C\/p\u003E\u003Cp\u003E\nHere example of how to use the Shape, Circle and Square classes:\n    \u003C\/p\u003E\n    \n   \n \u003Cdiv class =\"clsviewer \" \u003E\n  \u003Cdiv class =\"clsheader \"\u003E\n             \u003Ci class =\" languagecls \"\u003E  PHP \u003C\/i\u003E \n  \u003C\/div\u003E\n  \u003C pre class=\"ccontentclss \" \u003E\n\u003Ccode\u003E \n \n \u0026lt;?php  \n \n$shapes = array(\n    new Circle(5),\n    new Square(4),\n    new Circle(3)\n);\nforeach ($shapes as $shape) {\n    echo \"Area : \" . $shape-\u0026gt;getArea() . \"\u003Cbr\u003E\";\n}\n\n ?\u0026gt;  \n  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n  \u003Cp\u003E In this example We create an array of Shape objects that contains two Circle objects and one Square object.We then iterate over the array and call the getArea() method on each object which will call the appropriate implementation of the method in each subclass.\n    \u003C\/p\u003E\u003Cp\u003E\nBy using polymorphism we can write more flexible and extensible code that can be easily adapted to different situations.This allows us to write code that is more maintainable, reusable and efficient and makes it easier to add new functionality to our programs. \u003C\/p\u003E\u003C\/ol\u003E\n\n\u003Ch4\u003EBenefits of OOP in PHP:\u003C\/h4\u003E\n\u003Col\u003E\u003Cli\u003E\u003Cp\u003EReusability :OOP in PHP enables developers to write reusable code, which reduces development time and increases efficiency.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003E  Modularity: OOP in PHP allows developers to break down complex applications into smaller manageable components.This improves the organization of code and makes it easier to maintain and debug. \u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003E  Extensibility: OOP in PHP promotes the use of inheritance and polymorphism which allows developers to extend the functionality of existing code without modifying the original code.\u003C\/p\u003E\u003C\/li\u003E \u003Cli\u003E\u003Cp\u003ESecurity: O O P in PHP enables developers to implement secure coding practices such as encapsulation and data hiding which helps to protect sensitive data from unauthorized access.\u003C\/p\u003E\u003C\/li\u003E\u003C\/ol\u003E\n\n\u003Cp\u003EOOP in PHP is a powerful programming paradigm that enables developers to create scalable, efficient and maintainable applications. The essential OOP concepts in PHP including classes and objects, encapsulation, inheritance, polymorphism and abstraction, make it possible to create reusable, modular and secure code. By understanding the benefits of OOP in PHP developers can write better quality code that is easier to maintain and extend.\u003C\/p\u003E"},"link":[{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/1436035524094031151"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/1436035524094031151"},{"rel":"alternate","type":"text/html","href":"https:\/\/www.gettrickz.com\/2023\/02\/object-oriented-programming-in-php.html","title":" Start Learn PHP\/MYSQL : How to Do Object Oriented Programming(OOP) in PHP( Easy Explained )"}],"author":[{"name":{"$t":"Juber Khan Baloch"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/03500557746501068520"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"https:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjbDL56QCWVnfsLzlYPHiit0EwPFYUem83KHaGr_1B9TRWU_AQqpJLUNVAuvz1twgJfzJ_4vYxMsPX7C8sgqNq3SY-_E79jGkDZIFkJnwox5oJwwzKp9B5zWIbyTwuCzx7fvL2YSMMUG23cCAhFWRT4HjXEYmGcAL9x_jJSFuAsh3Y-7hq09CCb1wi02w\/s72-c\/Object-Oriented-Programming-in-PHP.jpg","height":"72","width":"72"}},{"id":{"$t":"tag:blogger.com,1999:blog-4095748245355156272.post-5611209826186953795"},"published":{"$t":"2023-02-16T17:31:00.009+05:30"},"updated":{"$t":"2023-02-25T00:15:11.279+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"control structures"},{"scheme":"http://www.blogger.com/atom/ns#","term":"data types"},{"scheme":"http://www.blogger.com/atom/ns#","term":"database connectivity"},{"scheme":"http://www.blogger.com/atom/ns#","term":"dynamic content"},{"scheme":"http://www.blogger.com/atom/ns#","term":"file handling"},{"scheme":"http://www.blogger.com/atom/ns#","term":"functions"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Howto"},{"scheme":"http://www.blogger.com/atom/ns#","term":"MYSQL"},{"scheme":"http://www.blogger.com/atom/ns#","term":"operators"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PHP"},{"scheme":"http://www.blogger.com/atom/ns#","term":"programming"},{"scheme":"http://www.blogger.com/atom/ns#","term":"variables"},{"scheme":"http://www.blogger.com/atom/ns#","term":"web applications"},{"scheme":"http://www.blogger.com/atom/ns#","term":"web development"}],"title":{"type":"text","$t":" Start Learn PHP\/MYSQL : How to Do PHP Development and MySQL Database Connectivity A Complete Guide for Beginners"},"content":{"type":"html","$t":"\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEghL5eKZrCu_YChm0F8odjOM92UJVahPJMXZdllX4sDDnnGVzfSU1OAYaQpzI4UadAIXab9A6HXGYvg8-cUKQS4G2btOZ-1b4Al6VHbt-a-ZDxhJCSgDLHT3Ew-C46pgBYyYiNDRgo1oH8TdkGeUzmHKMW64ePpE5l7gi32ZiGShc-E4pd8kQJQsiyz4Q\/s1024\/A-Comprehensive-Guide-to-the-Basics-of-Web-Development-and-Database-Connectivity-for-Beginners.jpg\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"\u003E\u003Cimg alt=\"A-Comprehensive-Guide-to-the-Basics-of-Web-Development-and-Database-Connectivity-for-Beginners\" border=\"0\" data-original-height=\"683\" data-original-width=\"1024\" height=\"213\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEghL5eKZrCu_YChm0F8odjOM92UJVahPJMXZdllX4sDDnnGVzfSU1OAYaQpzI4UadAIXab9A6HXGYvg8-cUKQS4G2btOZ-1b4Al6VHbt-a-ZDxhJCSgDLHT3Ew-C46pgBYyYiNDRgo1oH8TdkGeUzmHKMW64ePpE5l7gi32ZiGShc-E4pd8kQJQsiyz4Q\/w320-h213\/A-Comprehensive-Guide-to-the-Basics-of-Web-Development-and-Database-Connectivity-for-Beginners.jpg\" title=\"A-Comprehensive-Guide-to-the-Basics-of-Web-Development-and-Database-Connectivity-for-Beginners\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cp\u003E If you are interested in building web applications and working with databases but do not know where to start you have come to the right place. In our previous articles we have covered topics like\u003Ca href=\"https:\/\/www.gettrickz.com\/2020\/01\/start-learn-phpmysql-start-using-php-in.html\" target=\"_blank\"\u003EPHP and MySQL setup for Windows and Linux OS\u003C\/a\u003E. Today we will dive into the basics of \u003Ca href=\"https:\/\/www.gettrickz.com\/2016\/04\/start-learn-php-what-is-php-how-to.html\" target=\"_blank\"\u003EPHP\u003C\/a\u003E. As a powerful and versatile programming language, PHP is widely used for developing dynamic web applications, handling files and connecting to databases.By mastering its fundamentals you can take your web development skills to the next level.\n\u003C\/p\u003E\u003Cp\u003E\nIn this guide we will focus specifically on the basics of PHP web development and database connectivity. From variables and data types to operators, control structures and functions we will cover everything you need to know to get started with PHP.With real world examples and best practices we will guide you through the process of connecting PHP to a database and working with common database operations like reading, writing and updating data.\u003C\/p\u003E\n\u003Cp\u003E\nWhether you are a beginner or have some experience with other programming languages this guide will provide a solid foundation for building your skills in PHP and developing your own web applications.So let's Get started and learn the basics of web development and database connectivity in PHP to become a proficient web developer .\u003C\/p\u003E\n\u003Ch3\u003E\u003Cu\u003EHere are some of the basics of PHP:\u003C\/u\u003E\u003C\/h3\u003E\n\u003Col\u003E\u003Cli\u003E\u003Cb\u003ESyntax:\u003C\/b\u003E PHP code is typically embedded within HTML, using opening and closing tags respectively. PHP statements end with a semicolon (;).\n  \u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\nVariables: \u003C\/b\u003EIn PHP you can define variables using the $ symbol, followed by the variable name. For example, $name = \"John\"; assigns the value \"John\" to the variable $name.\n\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\nData Types:\u003C\/b\u003E PHP has various data types, including strings, integers, floats, booleans, arrays and objects.\n\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\nOperators:\u003C\/b\u003E PHP has various operators including arithmetic (+, -, *, \/, %), assignment (=), comparison (==, !=, \u0026gt;, \u0026lt;, \u0026gt;=, \u0026lt;=), and logical (\u0026amp;\u0026amp;, ||, !).\n\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\nControl Structures:\u003C\/b\u003E PHP has various control structures, including if-else statements, switch statements, while and do-while loops ,for loops and foreach loops.\n\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\nFunctions:\u003C\/b\u003E PHP allows you to define and call functions. Functions are used to perform specific tasks and can be reused throughout your code.\n\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\nForms: \u003C\/b\u003EPHP is commonly used in web development to process data submitted through HTML forms.\u003C\/li\u003E\u003C\/ol\u003E\n\u003Ch4\u003E1.Syntax:\u003C\/h4\u003E\n\u003Cp\u003E PHP is a server side scripting language which means that the code is executed on the server before the resulting HTML is sent to the client's browser. PHP code is typically embedded within HTML using opening and closing tags respectively.Here is an example of PHP code that prints \"Hello world!\" to the screen:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n echo \"Hello world!\";  \n ?\u0026gt;  \n   \n \u0026lt;\/body\u0026gt;  \n  \u0026lt;\/html\u0026gt; \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\n\u003Cp\u003EIn Example echo statement is used to print the text  \"Hello world !\"  to the screen. \u003C\/p\u003E\u003Cp\u003Eget started with running PHP code on your PC the first step is to run XAMPP controller .This will allow you to run PHP code on your computer\/PC. Once XAMPP is running navigate to the C \u003E xampp \u003E htdocs folder on your PC. In this folder create a new folder called \"test\".Next create a new file in this folder called \"index.php\". You can open this file in a plain text editor like notepad or you can download a more advanced editor like Sublime \u0026 Visual Studio .\n\u003C\/p\u003E\u003Cp\u003E\nAfter opening the \"index.php\" file in your text editor copy the PHP code from above and paste it into the file. Save the file  close the editor. You re now ready to run your first PHP Code .\n\u003C\/p\u003E\u003Cp\u003E\nTo do this open your web browser (such as Google Chrome\/ Internet Explorer)and enter the following URL in the address bar:\"localhost\/test\/index.php\". This will run the PHP code and display the message \"Hello world!\" in your web browser .\n\u003C\/p\u003E\u003Cp\u003E\nCongratulations you have successfully Run your first PHP code on your PC\/Computer.With this basic setup you can now begin to learn more about PHP  and Start building your own web applications .\u003C\/p\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEje2kZpIQVl3tB6KvHiam2D4xkDAdBES2_AiVDRvhrsF_CxmcJvzvpIMwIMxhajYiYxoRmoDPNpY6o-s_A0ipE5_1qtULLX9oA0XVitIF7OKyMi_K1EC6G1guxAU0XbtasmBs3Tnxl0amVYAvgcL9XO16e3x9oKGRdlFrKapKe4xLbVytIvDnVWXi-QcQ\/s800\/hello-world-first-php-code-run.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"\u003E\u003Cimg border=\"0\" data-original-height=\"367\" data-original-width=\"800\" height=\"294\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEje2kZpIQVl3tB6KvHiam2D4xkDAdBES2_AiVDRvhrsF_CxmcJvzvpIMwIMxhajYiYxoRmoDPNpY6o-s_A0ipE5_1qtULLX9oA0XVitIF7OKyMi_K1EC6G1guxAU0XbtasmBs3Tnxl0amVYAvgcL9XO16e3x9oKGRdlFrKapKe4xLbVytIvDnVWXi-QcQ\/w640-h294\/hello-world-first-php-code-run.jpg\" width=\"640\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cbr \/\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Cbr \/\u003E\u003C\/div\u003E\n\u003Ch4\u003E2.Variables:\u003C\/h4\u003E\nIn PHP variables re used to store values.Variables can be assigned a value using the $ symbol followed by the variable name . Example :\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $name = \"John\";  \n $age = 30;  \n $height = 1.75;  \n $is_student = true;  \n ?\u0026gt;  \n     \n \u0026lt;?php echo $name; ?\u0026gt;\u0026lt;br\u0026gt;  \n \u0026lt;?php echo $age; ?\u0026gt;\u0026lt;br\u0026gt;  \n \u0026lt;?php echo $height; ?\u0026gt;\u0026lt;br\u0026gt;  \n \u0026lt;?php echo $is_student; ?\u0026gt;  \n   \n  \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;   \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003E\nIn this example four variables are defined: $name, $age, $height and $is_student. The variable $name is assigned the value \"John\" $age is assigned the value 30 $height is assigned the value 1.75 and $is_student is assigned the value true. Note that PHP is a loosely typed language, which means that the data type of a variable is determined automatically based on the value assigned to it.\u003C\/p\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhf46ftGq1fkQaP8V_9gb3hRNPOH-55sTojRHcUl-IIL1bGMFomCBe6ewu8Pg0uNeuplnM2OD2DZVEWIBiN7_KVCGROp7ylff3b9P71Sny7OYlO2dFrEZp6Sf49cX43cUCB4FWli6FziC8k5dVBg2EY0OJObDmcT1meNkUZQiFylpqL8EO7gyTSy1oGdQ\/s800\/learn%20php%20code%20with%20gettrickz.jpg\" style=\"margin-left: 1em; margin-right: 1em;\"\u003E\u003Cimg border=\"0\" data-original-height=\"382\" data-original-width=\"800\" height=\"306\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhf46ftGq1fkQaP8V_9gb3hRNPOH-55sTojRHcUl-IIL1bGMFomCBe6ewu8Pg0uNeuplnM2OD2DZVEWIBiN7_KVCGROp7ylff3b9P71Sny7OYlO2dFrEZp6Sf49cX43cUCB4FWli6FziC8k5dVBg2EY0OJObDmcT1meNkUZQiFylpqL8EO7gyTSy1oGdQ\/w640-h306\/learn%20php%20code%20with%20gettrickz.jpg\" width=\"640\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cbr \/\u003E\u003Cp\u003E\u003Cbr \/\u003E\u003C\/p\u003E\n\u003Ch4\u003E3.Data Types:\u003C\/h4\u003E\n\u003Cstrong\u003E\u003Cu\u003EPHP has several data types including:\u003C\/u\u003E\u003C\/strong\u003E\n\u003Cul\u003E\u003Cli\u003E\nStrings: a sequence of characters enclosed in quotes. Example : \"Hello world!\"\n\u003C\/li\u003E\u003Cli\u003E\nIntegers: whole numbers without a decimal point. Example: 42\n\u003C\/li\u003E\u003Cli\u003E\nFloats: numbers with a decimal point. Example: 3.14\n\u003C\/li\u003E\u003Cli\u003E\nBooleans: true or false. Example: true\n\u003C\/li\u003E\u003Cli\u003E\nArrays: a collection of values indexed by a key. Example: $colors = array(\"red\", \"green\", \"blue\");\n\u003C\/li\u003E\u003Cli\u003E\nObjects: a complex data type that represents a realworld object. \u003C\/li\u003E\u003C\/ul\u003E\n\u003Cstrong\u003E\u003Cu\u003E\nExample:\u003C\/u\u003E\u003C\/strong\u003E\n\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $name = \" John \";  \n $age = 30;  \n ?\u0026gt;  \n     \n \u0026lt;?php echo \" Hello my name is $name and I m $age years old . \"; ?\u0026gt;  \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\u003Cp\u003EIn the above code , we define two variables using PHP.$name is a string datatype and is assigned the value \"John\" while $age is an integer datatype and is assigned the value 30. Using the echo statement we print a greeting to the screen that includes the values of these variables. The output of the code will be \"Hello , my name is John and I am 30 years old\". This simple example demonstrates how to define variables and output their values using PHP.\u003C\/p\u003E\n\u003Ch4\u003E4.Operators:\u003C\/h4\u003E\n\n\u003Cstrong\u003E\u003Cu\u003EPHP has several operators  including:\u003C\/u\u003E\u003C\/strong\u003E\n\u003Cp\u003E\u003Cstrong\u003E1.Arithmetic operators:\u003C\/strong\u003E used to perform mathematical operations , such as addition (+), subtraction (-), multiplication (*), division (\/) and modulus (%) .\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre  class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n \u0026lt;?php  \n $x = 10;  \n $y = 3;  \n echo $x + $y;    \/\/Outputs 13  \n echo $x - $y; \/\/ Outputs 7  \n echo $x * $y; \/\/Outputs 30  \n echo $x \/ $y; \/\/ Outputs 3.3333333333333  \n echo $x % $y; \/\/ Outputs 1  \n ?\u0026gt;  \n   \n   \n   \n \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003E\u003Cstrong\u003E2.Assignment operators :\u003C\/strong\u003E used to assign a value to a variable . Example:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre  class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $x = 10;\n $y = 3;\n $x += $y;  \/\/ equivalent to  $x = $x + $y;\n $x -= $y;   \/\/  equivalent to $x = $x - $y;\n $x *= $y; \/\/ equivalent to $x = $x * $y;\n $x \/= $y; \/\/  equivalent to $x = $x \/ $y;\n $x %= $y; \/\/ equivalent to $x = $x % $y;\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003E\u003Cstrong\u003E3.Comparison operators :\u003C\/strong\u003E used to compare two values . Example:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n  $x = 10;  \n  $y = 3;  \n  var_dump($x == $y); \/\/ Outputs bool(false)  \n  var_dump($x != $y); \/\/ Outputs bool(true)  \n  var_dump($x \u0026gt; $y); \/\/ Outputs bool(true)  \n  var_dump($x \u0026lt; $y); \/\/ Outputs bool(false)  \n  var_dump($x \u0026gt;= $y); \/\/ Outputs bool(true)  \n  var_dump($x \u0026lt;= $y); \/\/ Outputs bool(false)  \n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003E\u003Cstrong\u003E4.Logical operators :\u003C\/strong\u003E used to combine two or more conditions . Example:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n  $x = 10;  \n $y = 3;  \n $z = 5;  \n var_dump($x \u0026gt; $y \u0026amp;\u0026amp; $x \u0026gt; $z); \/\/ Outputs bool(true)  \n var_dump($x \u0026gt; $y || $x \u0026lt; $z); \/\/ Outputs bool(true)  \n var_dump(!($x \u0026gt; $y)); \/\/ Outputs bool(false)   \n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Ch3\u003E5.Control Structures:\u003C\/h3\u003E\n\u003Cstrong\u003E\u003Cu\u003E\nControl Structures In PHP  re Used to execute code based on certain conditions . \u003C\/u\u003E\u003C\/strong\u003E\n\u003Cp\u003E\u003Cstrong\u003EIf-else statements :\u003C\/strong\u003E used to execute code if a certain condition is true or execute a different code if the condition is false. Example:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $x = 10;\n$y = 3;\nif ($x \u0026gt; $y) {\n  echo \"x is greater than y\";\n} else {\n  echo \"x is less than or equal to y\";\n}  \n\u003Ci\u003E\/\/Outputs x is greater than y\u003C\/i\u003E\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\n\u003Cp\u003E\u003Cstrong\u003ESwitch statements :\u003C\/strong\u003E used to execute different code blocks based on the value of a variable . Example:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n$day = \"Monday\";\nswitch ($day) {\n  case \"Monday\":\n    echo \"Today is monday\";\n    break;\n  case \"Tuesday\":\n    echo \"Today is tuesday\";\n    break;\n  case \"Wednesday\":\n    echo \"Today is wednesday\";\n    break;\n  default:\n    echo \"Today is not monday, tuesday or wednesday\";\n} \n\u003Ci\u003E\/\/Outputs Today is monday\u003C\/i\u003E\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003E\u003Cstrong\u003ELoops:\u003C\/strong\u003E used to execute a block of code multiple times . Here are some examples:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n\u0026lt;?php  \n \/\/ While loop  \n $i = 1;  \n while ($i \u0026lt;= 10) {  \n  echo $i;  \n  $i++;  \n }  \n ?\u0026gt;  \u003Ci\u003E\/\/Outputs 12345678910\u003C\/i\u003E\n \u0026lt;br\u0026gt; \u0026lt;?php  \n \/\/ Do-while loop  \n $i = 1;  \n do {  \n  echo $i;  \n  $i++;  \n } while ($i \u0026lt;= 10);  \n   \n \/\/ For loop  \n for ($i = 1; $i \u0026lt;= 10; $i++) {  \n  echo $i;  \n }  \n ?\u0026gt;  \u003Ci\u003E\/\/Outputs 1234567891012345678910\u003C\/i\u003E\n \u0026lt;br\u0026gt;\u0026lt;?php  \n \/\/ Foreach loop (used to loop through arrays)  \n $colors = array(\"Red\", \"Green\", \"Blue\");  \n foreach ($colors as $color) {  \n  echo $color;  \n }  \n ?\u0026gt;  \u003Ci\u003E\/\/Outputs RedGreenBlue\u003C\/i\u003E\n    \n\n\n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\n\u003Ch3\u003E6.Functions:\u003C\/h3\u003E\n\u003Cp\u003E\nFunctions in PHP are used to perform specific tasks and can be reused throughout your code. Here 's an example of a function that calculates the sum of two numbers :\u003C\/p\u003E\n\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \nfunction sum($x, $y) {\n  $result = $x + $y;\n  return $result;\n}\n\necho sum(2, 3); \n\n ?\u0026gt;  \u003Ci\u003E\/\/ Outputs 5\u003C\/i\u003E\n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003EIn this example a function called 'sum ' is defined that takes two parameters $x and $y calculates their sum and returns the result using the return statement. The function is then called with the arguments 2 and 3 and the result is printed using the echo statement.\n\u003C\/p\u003E\u003Cp\u003E\nFunctions can also have default parameter values which are used if no value is passed in for that parameter:\u003C\/p\u003E\n\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \nfunction sayHello($name = \"World\") {\n  echo \"Hello, $name!\";\n}\n\nsayHello(); \nsayHello(\"John\"); \n\n ?\u0026gt;  \u003Ci\u003E\/\/ Outputs \"Hello World!\"\u003C\/i\u003E \n \u003Ci\u003E\/\/ Outputs \"Hello John!\" \u003C\/i\u003E\n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\u003Cp\u003EIn this example a function called sayHello is defined that takes an optional parameter $name with a default value of \"World\" . If a value is passed in for $name that value is used , otherwise the default value is used. The function is then called twice once with no argument and once with the argument \"John\" , and the output is printed using the echo statement.\u003C\/p\u003E\n\n\u003Ch3\u003E7.Arrays:\u003C\/h3\u003E\u003Cp\u003E\nArrays in PHP are used to store multiple values in a single variable. Here 's an example of an array:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n$colors = array(\"red\", \"green\", \"blue\");\necho $colors[0]; \/\/ Outputs \"red\"\necho $colors[1]; \/\/ Outputs \"green\"\necho $colors[2]; \/\/ Outputs \"blue\"\n\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003EIn this example an array called $colors is defined that contains three elements . The elements are accessed using their index , which starts at 0.\u003C\/p\u003E\n\u003Cp\u003E\n  Arrays can also be created using the array function :\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n$ages = array(\"Peter\" =\u0026gt; 32, \"John\" =\u0026gt; 28, \"Mary\" =\u0026gt; 45);\necho $ages[\"John\"]; \/\/ Outputs 28\n\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\u003Cp\u003E\nIn this example an array called $ages is defined using key-value pairs . The elements are accessed using their key which is a string .\n\u003C\/p\u003E\u003Cp\u003E\n  Arrays can be looped through using the foreach loop :\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n$colors = array(\"red\", \"green\", \"blue\");\nforeach ($colors as $color) {\n  echo $color;\n}\n\/\/ Outputs RedGreenBlue\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003EIn this example the array $colors is looped through using the foreach loop and each element is printed using the echo statement.\u003C\/p\u003E\n\n\u003Ch3\u003E8.File Handling:\u003C\/h3\u003E\n\u003Cp\u003EFile handling in PHP is used to read and write files on a server . The fopen function is used to open a file and returns a file pointer that is used to access the file. Here 's an example of reading a file: Create a new file and name it \"example.txt\".Type \"Hello World My name is Jhon\" into the file and save the file . \u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n$file = fopen(\"example.txt\", \"r\");\nif ($file) {\n  while (($line = fgets($file)) !== false) {\n    echo $line;\n  }\n  fclose($file);\n}\n\/\/ Outputs Hello World My name  is Jhon\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\u003Cp\u003E\n \nIn this example  the fopen function is used to open a file called example.txt in read mode . The while loop is used to read each line of the file using the fgets function and output it using the echo statement. Finally the fclose function is used to close the file .\n\u003C\/p\u003E\u003Cp\u003E\u003C\/p\u003E\u003Cp\u003E\n  writing to a file is also possible Using the  fopen function in write mode :\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n$file = fopen(\"example.txt\", \"w\");\nfwrite($file, \"Hello World!\");\nfclose($file);\n ?\u0026gt;  \n   \n   \n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003E\nIn this example, the fopen function is used to open a file called example.txt in write mode. The fwrite function is used to write the string \"Hello World!\" to the file, and the fclose function is used to close the file.\u003C\/p\u003E\n\u003Ch3\u003E9. Database Connectivity:\u003C\/h3\u003E\n\u003Cp\u003EPHP is often used for web development, and it 's common to interact with databases to store and retrieve data. PHP provides several extensions to interact with databases including MySQL and PostgreSQL.\n\u003C\/p\u003E\u003Cp\u003EIn a previous post about\u003Ca href=\"https:\/\/www.gettrickz.com\/2016\/05\/start-learn-phpmysql-what-is-mysql-why.html\" target=\"_blank\"\u003E MySQL\u003C\/a\u003E, we discussed how to create a database and table. In this post we will provide a summary of those steps and explain how to create a database using phpMyAdmin .\u003C\/p\u003E\u003Cp\u003EIn this post we will explain how to create a database using phpMyAdmin which is a popular webbased tool for managing MySQL databases. With phpMyAdmin you can easily create and manage databases , tables and other database objects.\u003C\/p\u003E\u003Cp\u003EYou can create a new database by following these Steps:\u003C\/p\u003E\u003Col\u003E\u003Cli\u003EClick on the \"New\" button in the left hand navigation menu to create a new database.\u003C\/li\u003E\u003Cli\u003EEnter a name for your database in the \"Create database\" form.You can choose any name you like but it ' s a good idea to choose something descriptive and easy to remember.\u003C\/li\u003E\u003Cli\u003ESelect the default collation for your database. This specifies the character set and sorting order that should be used for text data in your database. In most cases , you can leave this set to the default value of \"utf8_general_ci\".\u003C\/li\u003E\u003Cli\u003EClick the \"Create\"  button to create your new database.\u003C\/li\u003E\u003C\/ol\u003E\u003Cp\u003EOnce you have created your database , you can start creating tables by following these steps:\u003C\/p\u003E\u003Col\u003E\u003Cli\u003EClick on the name of the database you just created to enter it.\u003C\/li\u003E\u003Cli\u003EClick on the \"New\" button in the left  hand navigation menu to create a new table.\u003C\/li\u003E\n  \u003Cli\u003EEnter a name for your table in the \"Create table\" form. Again , it 's a good idea to choose a descriptive name that reflects the purpose of your table.\u003C\/li\u003E\u003Cli\u003EEnter the number of Columns you want your table to have.Each column represents a different Type of data that you want to store in the table.\u003C\/li\u003E\u003Cli\u003EFor each column, enter a name and select a data type. The data type determines the kind of data that can be stored in the column. For example , you might use an \"int\" data type for numeric values or a \"varchar\" data type for text strings.\u003C\/li\u003E\u003Cli\u003EYou can also specify additional options for each column, such as whether it should be a primary key (which uniquely identifies each row in the table), or whether it should have a default value or be set to auto-increment.\u003C\/li\u003E\u003Cli\u003EOnce you have defined all of your columns and their options, click the \"Save\" button to create your new table.\u003C\/li\u003E\u003C\/ol\u003E\u003Cp\u003EThat's it! You have now created a new database and table using phpMyAdmin. From here, you can start populating your table with data, running queries and managing your database in a variety of other ways.\u003C\/p\u003E\n\u003Cp\u003ETo create a table named \"users\" with three columns - \"id\", \"name\" and \"email\" - using phpMyAdmin, you can follow these steps:\u003C\/p\u003E\n\u003Col\u003E\u003Cli\u003E\u003Cp\u003EOpen phpMyAdmin and select the database where you want to create the \"users\" table.You can select the database by clicking on its name in the left-hand sidebar.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003EClick on the \"Structure\" tab at the top of the page to create a new table.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003EIn the \"Create table\" section, enter \"users\" in the \"Table name\" field.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003EUnder \"Number of columns\" , enter \"3\".\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003EIn the first row of the \"Column name\" column, enter \"id\".\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003EIn the \"Type\" column for the \"id\" column select \"INT\" for integer.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003ECheck the \"A.I.\" (Auto Increment) checkbox to make the \"id\" column an autoincrementing field.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003EIn the \"Attributes\" section for the \"id\" column, select \"Primary\" to make it the primary key of the table.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003ERepeat steps 5-8 for the \"name\" and \"email\" columns.\u003C\/p\u003E\u003C\/li\u003E\u003Cli\u003E\u003Cp\u003EClick on the \"Save\" button at the bottom of the page to create the \"users\" table with the specified columns.\u003C\/p\u003E\u003C\/li\u003E\u003C\/ol\u003E\u003Cp\u003EThat 's it! You have now successfully created a new table named \"users\" with three columns using phpMyAdmin. You can now start populating the table with data by using the \"Insert\" tab in phpMyAdmin or by using SQL statements to insert data directly into the table.\u003C\/p\u003E\n\u003Cp\u003E\u003Cstrong\u003EInsert query\u003C\/strong\u003E\u003C\/p\u003E\n\u003Cp\u003ETo insert data into the \"users\" table using SQL queries in PHP You can use The following code :\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $servername = \"localhost\";  \n $username = \"username\";  \n $password = \"\";  \n $dbname = \"myDataB\";  \n   \n \/\/ Create connection  \n $conn = new mysqli($servername, $username, $password, $dbname);  \n   \n \/\/ Check connection  \n if ($conn-\u0026gt;connect_error) {  \n  die(\"Connection failed: \" . $conn-\u0026gt;connect_error);  \n }  \n   \n\/\/ Insert data into the table\n$sql = \"INSERT INTO users (name, email) VALUES ('John', 'john@example.com')\";\nif ($conn-\u0026gt;query($sql) === TRUE) {\n    echo \"New record created successfully\";\n} else {\n    echo \"Error: \" . $sql . \"\u003Cbr \/\u003E\" . $conn-\u0026gt;error;\n}\n   \n \/\/ Close connection  \n $conn-\u0026gt;close();  \n ?\u0026gt;    \n   \n   \n   \u003Ci\u003E\/\/Outputs new record created successfully\u003C\/i\u003E\n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003EThis  code creates a new connection to your MySQL database using the connection variables (servername, username, password, dbname), and then inserts a new record into the \"users\" table with the values \"John \" for the \"name\" column and \"john@example.com\" for the \"email\" column.\u003C\/p\u003E\n\u003Cp\u003E\u003Cstrong\u003ESELECT query\u003C\/strong\u003E\u003C\/p\u003E\n\u003Cp\u003E\n  Here 's an example of connecting to a MySQL database and executing a query:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $servername = \"localhost\";  \n $username = \"username\";  \n $password = \"\";  \n $dbname = \"myDataB\";  \n   \n \/\/ Create connection  \n $conn = new mysqli($servername, $username, $password, $dbname);  \n   \n \/\/ Check connection  \n if ($conn-\u0026gt;connect_error) {  \n  die(\"Connection failed: \" . $conn-\u0026gt;connect_error);  \n }  \n   \n \/\/ Execute query  \n $sql = \"SELECT * FROM users\";  \n $result = $conn-\u0026gt;query($sql);  \n   \n \/\/ Output results  \n if ($result-\u0026gt;num_rows \u0026gt; 0) {  \n  while ($row = $result-\u0026gt;fetch_assoc()) {  \n   echo \"Name: \" . $row[\"name\"] . \" - Email: \" . $row[\"email\"];  \n  }  \n } else {  \n  echo \"0 results\";  \n }  \n   \n \/\/ Close connection  \n $conn-\u0026gt;close();  \n ?\u0026gt;    \n   \n     \u003Ci\u003E\/\/Outputs Name: John - Email: john@example.com\u003C\/i\u003E\n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003EIn this Example, a connection to a MySQL database is established using the mysqli extension. The connect_error property is used to check if the connection was successful.The query method is used to execute a SQL query, and the fetch_assoc method is used to retrieve each row of the result set. Finally , the close method is used to Close the connection.\u003C\/p\u003E\n\n\u003Cp\u003E\u003Cstrong\u003EUPDATE query\u003C\/strong\u003E\u003C\/p\u003E\n\u003Cp\u003ETo update an existing record in the \"users\" table using an SQL query in PHP  you can use the following code as an example:\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $servername = \"localhost\";  \n $username = \"username\";  \n $password = \"\";  \n $dbname = \"myDataB\";  \n   \n \/\/ Create connection  \n $conn = new mysqli($servername, $username, $password, $dbname);  \n   \n \/\/ Check connection  \n if ($conn-\u0026gt;connect_error) {  \n  die(\"Connection failed: \" . $conn-\u0026gt;connect_error);  \n }  \n   \n \/\/ Update record in the table\n$sql = \"UPDATE users SET name='Jane Ross', email='jane.ross@example.com' WHERE id=1\";\nif ($conn-\u0026gt;query($sql) === TRUE) {\n    echo \"Record updated successfully\";\n} else {\n    echo \"Error updating record: \" . $conn-\u0026gt;error;\n}\n   \n \/\/ Close connection  \n $conn-\u0026gt;close();  \n ?\u0026gt;    \n   \n     \u003Ci\u003E\/\/Outputs record updated successfully\u003C\/i\u003E\n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003EIn this Example , the code connects to the MySQL database using the connection variables (servername, username, password , dbname)  and then updates the record with an \"id\" value of 1 in the \"users\" table to set the \"name\" to \"Jane Ross\" and The \"email\" to \"jane.ross@example.com\" .\n\u003C\/p\u003E\u003Cp\u003E\nYou can modify the sql query to update different records in the table with different values.You can use various SQL operators and conditions to specify which records you want to update. For Example , you can use the WHERE clause to Specify a condition that must be met for the record to be updated .\u003C\/p\u003E\n\n\u003Cp\u003E\u003Cstrong\u003EDELETE query\u003C\/strong\u003E\u003C\/p\u003E\n\u003Cp\u003ETo delete a record from the \"users\" table using an SQL query in PHP  you can use the following code as an example :\u003C\/p\u003E\n\u003Cdiv class=\" clsviewer \"\u003E\n  \u003Cdiv class=\" clsheader \"\u003E\n    \u003Ci class=\" languagecls \"\u003EPHP \u003C\/i\u003E\n  \u003C\/div\u003E\n  \u003Cpre class=\" ccontentclss\"\u003E\u003Ccode\u003E  \u0026lt;!DOCTYPE html\u0026gt;  \n \u0026lt;html\u0026gt;  \n \u0026lt;body\u0026gt;  \n   \n \u0026lt;?php  \n $servername = \"localhost\";  \n $username = \"username\";  \n $password = \"\";  \n $dbname = \"myDataB\";  \n   \n \/\/ Create connection  \n $conn = new mysqli($servername, $username, $password, $dbname);  \n   \n \/\/ Check connection  \n if ($conn-\u0026gt;connect_error) {  \n  die(\"Connection failed: \" . $conn-\u0026gt;connect_error);  \n }  \n   \n \/\/ Delete record from the table\n$sql = \"DELETE FROM users WHERE id=1\";\nif ($conn-\u0026gt;query($sql) === TRUE) {\n    echo \"Record deleted successfully\";\n} else {\n    echo \"Error deleting record: \" . $conn-\u0026gt;error;\n}\n \/\/ Close connection  \n $conn-\u0026gt;close();  \n ?\u0026gt;    \n   \n     \u003Ci\u003E\/\/Outputs record deleted successfully\u003C\/i\u003E\n   \n   \n \u0026lt;\/body\u0026gt;  \n \u0026lt;\/html\u0026gt;  \u003C\/code\u003E\u003C\/pre\u003E\n\u003C\/div\u003E\n\u003Cp\u003EIn this Example , the code connects to the MySQL database using the connection variables (servername, username, password , dbname), and then deletes the record with an \"id\" value of 1 from the \"users\" table.\n\u003C\/p\u003E\u003Cp\u003E\nYou can modify the SQL query to delete different records from the table based on different conditions. For example  you can use the WHERE clause to specify a condition that must be met for the record to be deleted .\u003C\/p\u003E\n\n\u003Cp\u003E\nPHP is a versatile programming language used for web development, file handling and database connectivity. With a solid understanding of the basics covered in this article, you'll be well on your way to building web applications and working with databases in PHP.The next post promises to be an exciting one as we delve into the world of object-oriented programming (OOP) in PHP. With this , you can expect to gain a deeper understanding of PHP and MySQL and be better equipped to develop small applications. OOP is an essential programming concept that makes code more organized, easier to maintain, and helps reduce errors. So be sure to tune in for the next post to enhance your PHP development skills and take your coding abilities to the next level.\u003C\/p\u003E"},"link":[{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/5611209826186953795"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/5611209826186953795"},{"rel":"alternate","type":"text/html","href":"https:\/\/www.gettrickz.com\/2020\/01\/start-learn-phpmysql-how-to-code-in-php.html","title":" Start Learn PHP\/MYSQL : How to Do PHP Development and MySQL Database Connectivity A Complete Guide for Beginners"}],"author":[{"name":{"$t":"Juber Khan Baloch"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/03500557746501068520"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"https:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEghL5eKZrCu_YChm0F8odjOM92UJVahPJMXZdllX4sDDnnGVzfSU1OAYaQpzI4UadAIXab9A6HXGYvg8-cUKQS4G2btOZ-1b4Al6VHbt-a-ZDxhJCSgDLHT3Ew-C46pgBYyYiNDRgo1oH8TdkGeUzmHKMW64ePpE5l7gi32ZiGShc-E4pd8kQJQsiyz4Q\/s72-w320-h213-c\/A-Comprehensive-Guide-to-the-Basics-of-Web-Development-and-Database-Connectivity-for-Beginners.jpg","height":"72","width":"72"}},{"id":{"$t":"tag:blogger.com,1999:blog-4095748245355156272.post-509425786902165761"},"published":{"$t":"2023-02-08T13:04:00.013+05:30"},"updated":{"$t":"2023-03-15T16:36:07.721+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Atta Pol"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Cash"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Earn money online"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Earn Tricks"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Extra income"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Gift cards"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Howto"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Make Money"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Maximize earning potential"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Mobile app"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PayPal"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Points"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Rewards"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Spare time"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Step-by-step guide"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Surveys"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Tasks"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Videos"}],"title":{"type":"text","$t":"How to Makes it Easy to Earn Money from your Mobile ( Earning Money Online )"},"content":{"type":"html","$t":"\u003Cp\u003E\u003C\/p\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhKXkV0JznbG0UU3kay0t_xM0zgwnGDSF-zT9UVOcYlRx_2I4oqXPS9mavcbqfW08Dbs-QJuKk0-Sk9bL-jNnfRpSx7PK79sds3nMBO3vbC6IDafap-KEO3-HYvRvXq_22qVsSluoNKmUvlyUuA96cuci-afQy12jH-BJrYDkljMx4SXrHaN2wSJjnBWg\/s800\/A%20Step-by-Step%20Guide%20to%20Earning%20Money%20Online%20and%20Makes%20it%20Easy%20to%20Earn%20Money%20from%20Your%20Mobile%20Device.jpg\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"\u003E\u003Cimg border=\"0\" data-original-height=\"533\" data-original-width=\"800\" height=\"213\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhKXkV0JznbG0UU3kay0t_xM0zgwnGDSF-zT9UVOcYlRx_2I4oqXPS9mavcbqfW08Dbs-QJuKk0-Sk9bL-jNnfRpSx7PK79sds3nMBO3vbC6IDafap-KEO3-HYvRvXq_22qVsSluoNKmUvlyUuA96cuci-afQy12jH-BJrYDkljMx4SXrHaN2wSJjnBWg\/s320\/A%20Step-by-Step%20Guide%20to%20Earning%20Money%20Online%20and%20Makes%20it%20Easy%20to%20Earn%20Money%20from%20Your%20Mobile%20Device.jpg\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cp\u003EThe internet has opened up a world of opportunities for people looking to earn money from the comfort of their own homes. With the rise of e-commerce and online jobs, earning money online has become a viable option for many people. With the availability of numerous websites and mobile apps anyone can take advantage of the limitless potential to earn money from the comfort of their own homes.\n\nWhether you are a student, a stay at-home parent, or simply looking for a side hustle, there are countless opportunities available to you online. From freelancig to taking surveys, to selling goods and services the possibilities are endless. With the rise of e-commerce platforms like Etsy and eBay it has become easier than ever to turn your passions and skills into a profitable business.\u003C\/p\u003E\u003Ch4 style=\"text-align: left;\"\u003E\u003Cb\u003E\u003Cspan style=\"font-size: medium;\"\u003EHere are some popular ways to earn money online :\u003C\/span\u003E\u003C\/b\u003E\u003C\/h4\u003E\u003Cul\u003E\u003Cli\u003E\u003Cb\u003E\nOnline freelancing -\u003C\/b\u003E Offer your skills and services on platforms such as Upwork, Fiverr or Freelancer. You can earn money by doing tasks such as writing, graphic design and programming.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\n\nOnline surveys -\u003C\/b\u003E Participate in market research studies by taking online surveys. Companies will pay you for your opinions on a variety of topics from products and services to politics and current events .\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\n\nSelling goods online - \u003C\/b\u003ESell products on platforms such as Etsy, eBay or Amazon. Whether you make your own products or sell items you no longer need there are many opportunities to Earn money by selling goods online.\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\n\nAffiliate marketing -\u003C\/b\u003E Promote products and earn a commission for each sale you generate .There are many affiliate programs available including amazon 's affiliate program which pays you for promoting products on their website .\u003C\/li\u003E\u003Cli\u003E\u003Cb\u003E\n\nDropshipping -\u003C\/b\u003E Start an online store without having to hold any inventory by using a dropshipping model. You 'll sell products from a supplier and the supplier will handle all the shipping and handling.\u003C\/li\u003E\u003C\/ul\u003E\u003Cdiv\u003E\u003Ch4 style=\"text-align: left;\"\u003E\u003Cb\u003E\u003Cspan style=\"font-size: medium;\"\u003EAtta Pol: A Mobile App to Earn Money\u003C\/span\u003E\u003C\/b\u003E\u003C\/h4\u003E\u003C\/div\u003E\n\u003Cp\u003E\n\nAtta Pol is a mobile app that allows you to earn money by completing small tasks. Tasks can include taking surveys, watching videos and downloading and using other apps. For each task you complete, you 'll earn points which can then be redeemed for cash or gift cards to popular retailers such as Amazon, Walmart and Starbucks.\n\u003C\/p\u003E\u003Cp\u003E\nTo start earning with Atta Pol simply download the app sign up for an account and start completing tasks. The tasks available will vary, but you can expect to earn anywhere from a few cents to a few dollars for each one you complete.With Atta Pol, you can easily earn extra cash in your free time, all from the convenience of your mobile device.\u003C\/p\u003E\n\n\u003Cp\u003E\u003Cb\u003EAttaPol is a user friendly App that makes it easy for anyone to earn money online .\u0026nbsp;\u003C\/b\u003E\u003C\/p\u003E\u003Cp\u003E\u003Cb\u003EHere 's how it works :\u003C\/b\u003E\u003C\/p\u003E\n\u003Cul\u003E \u003Cli\u003E\nDownload the App: The first step is to download the Atta Pol app from the App Store or Google Play Store . The app is free to download and use.\n\u003C\/li\u003E\u003Cli\u003E\nSign Up : Once you 've downloaded the app sign up for an account. You'll need to provide basic information such as your name, email address and payment method.\n\u003C\/li\u003E\u003Cli\u003E\nComplete Tasks: Once you 've signed up, you'll have access to a range of tasks that you can complete to earn money\/points. Tasks can include taking surveys, watching videos  and downloading and using other apps.\n\u003C\/li\u003E\u003Cli\u003E\nEarn Money\/Points: For each task you complete  you 'll earn money\/points. The number of money\/points you earn will depend on the task and the complexity involved.\n\u003C\/li\u003E\u003Cli\u003E\nRedeem Money\/Points: When you 've accumulated enough money\/points , You can cash out your rewards through a variety of methods , including PayPal.\n\u003C\/li\u003E\u003C\/ul\u003E\n\u003Cp\u003EAtta Pol is a great way to earn extra cash in your free time. With its simple and user friendly interface, anyone can start earning money with Atta Pol. Whether you 're looking for a little extra pocket change or a full-time income, Atta Pol provides a convenient and flexible way to earn money online.\u003C\/p\u003E\u003Cp style=\"text-align: center;\"\u003E\u003Cb\u003E\n\n  \"Discover the Convenience of Earning Money on the  Go with Atta Pol - Download the App Today ! Click Below Link Download AttaPol App \"\u003C\/b\u003E\u003C\/p\u003E\u003Cp style=\"text-align: left;\"\u003E\u003C\/p\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/attapoll.app\/join\/zrivi\" rel=\"nofollow\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\"\u003E\u003Cimg border=\"0\" data-original-height=\"167\" data-original-width=\"499\" height=\"65\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgJ2Z1mlizGnFZF512N4tyI7mu2971-rNOFgF4bTwpYL3vIsGhd0A9-Z8kFG_Iv7KUbthKZGmcHGui0oqvF_XaD45ydGJ_fqazevqiQVXcnHJhI1fUG5L_dUpP0i9uBWG68cQyWZnWkIF-f34Bk0E9QVArs9GbLweEZyQ3__0OBBM_3DDRrknDAl_YYWw\/w193-h65\/appstore.png\" width=\"193\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cbr \/\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ca href=\"https:\/\/attapoll.app\/join\/zrivi\" rel=\"nofollow\" style=\"margin-left: 1em; margin-right: 1em;\" target=\"_blank\"\u003E\u003Cimg border=\"0\" data-original-height=\"250\" data-original-width=\"646\" height=\"90\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiiMuZvOeWqDC90K4gF6sZL-dDNMiD4qDA7Z4JVwJZKnAb_FFmRrOh97UNJt5TxBoU0aXteuTeFTQBV-m7oPgESe5nunXc5dYHQnOLZ1_fJccC1F_Ak_bH809tuQfonqqWEpp1NNLZSJHYGkkkmHIlqXuJiq9y248JEEi5gxNry4zr8eCtC0KEjixJmgw\/w231-h90\/google%20Play.png\" width=\"231\" \/\u003E\u003C\/a\u003E\u003C\/div\u003E\u003Cbr \/\u003E\u003Cb\u003E\u003Cbr \/\u003E\u003C\/b\u003E\u003Cp\u003E\u003C\/p\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/www.gettrickz.com\/feeds\/509425786902165761\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/www.gettrickz.com\/2023\/02\/a-step-by-step-guide-to-earning-money.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/509425786902165761"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/509425786902165761"},{"rel":"alternate","type":"text/html","href":"https:\/\/www.gettrickz.com\/2023\/02\/a-step-by-step-guide-to-earning-money.html","title":"How to Makes it Easy to Earn Money from your Mobile ( Earning Money Online )"}],"author":[{"name":{"$t":"Juber Khan Baloch"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/03500557746501068520"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"https:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhKXkV0JznbG0UU3kay0t_xM0zgwnGDSF-zT9UVOcYlRx_2I4oqXPS9mavcbqfW08Dbs-QJuKk0-Sk9bL-jNnfRpSx7PK79sds3nMBO3vbC6IDafap-KEO3-HYvRvXq_22qVsSluoNKmUvlyUuA96cuci-afQy12jH-BJrYDkljMx4SXrHaN2wSJjnBWg\/s72-c\/A%20Step-by-Step%20Guide%20to%20Earning%20Money%20Online%20and%20Makes%20it%20Easy%20to%20Earn%20Money%20from%20Your%20Mobile%20Device.jpg","height":"72","width":"72"},"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-4095748245355156272.post-6753173933111980369"},"published":{"$t":"2016-04-29T00:02:00.003+05:30"},"updated":{"$t":"2023-02-22T15:03:02.432+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Howto"},{"scheme":"http://www.blogger.com/atom/ns#","term":"MVC"},{"scheme":"http://www.blogger.com/atom/ns#","term":"MYSQL"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PHP"}],"title":{"type":"text","$t":"Start Learn PHP\/MYSQL: What is PHP ? How to Learn PHP Easily ?"},"content":{"type":"html","$t":"\u003Cdiv dir=\"ltr\" style=\"text-align: left;\" trbidi=\"on\"\u003E\n\u003Ca href=\"https:\/\/2.bp.blogspot.com\/-STuqojpdEoA\/VyJWkSMtglI\/AAAAAAAADog\/H60kXR1e8-8wTR69Mal7ykbYSDwdXe_mACLcB\/s1600\/PHP-logo.svg.png\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"\u003E\u003Cimg border=\"0\" height=\"169\" src=\"https:\/\/2.bp.blogspot.com\/-STuqojpdEoA\/VyJWkSMtglI\/AAAAAAAADog\/H60kXR1e8-8wTR69Mal7ykbYSDwdXe_mACLcB\/s320\/PHP-logo.svg.png\" width=\"320\" \/\u003E\u003C\/a\u003E\u003Cp\u003EIt has been quite some time since I started working as a PHP developer , and I've been contemplating the idea of sharing my knowledge of PHP with readers. In this post, I aim to provide an overview of PHP for beginners.\n\u003C\/p\u003E\n\u003Ch3\u003EDefinition and Full Form:\u003C\/h3\u003E\n\u003Cp\u003ETo begin with, PHP is a server-side scripting language that was first introduced by Rasmus Lerdorf in 1994. The term PHP is an acronym that stands for Personal Home Page, but it is now more commonly referred to as PHP: Hypertext Preprocessor.\u003C\/p\u003E\n\u003Cb\u003EWhat is server-side scripting language?\u003C\/b\u003E\u003Cbr \/\u003E\n\u003Cb\u003EServer-side scripting language \u003C\/b\u003Eexecute (run) on the server. server-side environment that runs a scripting language is a web server. A user 's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages. This HTML is then sent to the client browser. It is usually used to provide interactive web sites that interface to databases or other data stores on the server.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Cp\u003EAs a server-side scripting language, PHP is primarily used for building dynamic web applications that can run on various web servers, such as Apache and Nginx. With PHP, developers can create web pages that can interact with databases, process user input, and generate dynamic content.\n\u003C\/p\u003E\u003Cp\u003E\nFor beginners who are just starting to learn PHP, it is essential to understand the basics of the language, such as its syntax and structure. PHP code is executed on the server, and the output is sent to the user's browser in the form of HTML. To execute PHP code , it must be written within special tags that start with \"\u003C?php\" and end with \"?\u003E\".\n\u003C\/p\u003E\u003Cp\u003E\nOne of the significant benefits of PHP is its compatibility with various platforms and operating systems, including Windows, Linux, and macOS. Additionally, PHP has a vast community of developers who have created numerous frameworks, libraries, and tools to make web development faster and more efficient.\u003C\/p\u003E\n\u003Cb\u003EWhat You Mean By Hypertext Preprocessor ?\u003C\/b\u003E\u003Cbr \/\u003E\nHypertext Preprocessor (It is a recursive acronym, if you can understand what that means.) PHP is an HTML-embedded Web scripting language. This means PHP code can be inserted into the HTML of a Web page. When a PHP page is accessed, the PHP code is read or \"parsed\" by the server the page resides on. The output from the PHP functions on the page are typically returned as HTML code, which can be read by the browser. Because the PHP code is transformed into HTML before the page is loaded, users cannot view the PHP code on a page. This make PHP pages secure enough to access databases and other secure information.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n  \n\u003Cb\u003EPHP5\u003C\/b\u003E\u003Cbr \/\u003E\nPHP 5 was released in July 2004 . It is mainly driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new features.\n\nPHP-related and supporting projects, such as PEAR, PECL, and documentation, and an underlying network infrastructure of well over one-hundred individual web servers on six of the seven continents of the world.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Cb\u003EExample Syntax.\u003C\/b\u003E\u003Cbr \/\u003E\n\u003Cblockquote class=\"tr_bq\"\u003E\n\u0026lt;?php\u003Cbr \/\u003E\necho \"Hello World\";\u003Cbr \/\u003E\n\u0026nbsp;?\u0026gt;\u003C\/blockquote\u003E\nOutput:Hello World\u003C\/div\u003E\n"},"link":[{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/6753173933111980369"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/4095748245355156272\/posts\/default\/6753173933111980369"},{"rel":"alternate","type":"text/html","href":"https:\/\/www.gettrickz.com\/2016\/04\/start-learn-php-what-is-php-how-to.html","title":"Start Learn PHP\/MYSQL: What is PHP ? How to Learn PHP Easily ?"}],"author":[{"name":{"$t":"Juber Khan Baloch"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/03500557746501068520"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"16","height":"16","src":"https:\/\/img1.blogblog.com\/img\/b16-rounded.gif"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/2.bp.blogspot.com\/-STuqojpdEoA\/VyJWkSMtglI\/AAAAAAAADog\/H60kXR1e8-8wTR69Mal7ykbYSDwdXe_mACLcB\/s72-c\/PHP-logo.svg.png","height":"72","width":"72"}}]}});