PhP Classes and Objects Explained
Class: Class is a way to organize the data. For instance , you want to write a program to display the names of parts of a car. What you can do is you can echo out all...
Class: Class is a way to organize the data. For instance , you want to write a program to display the names of parts of a car. What you can do is you can echo out all...
This script simulates a dog moving to its kennel. It consists of all conditional statements except switch. Initially we set to random positions for the dog and the kennel using the php function rand(). We set...
1. If, else and ifelse: <? PHP $num = 1; If ($num ==1) /*checks if the name is equal to 1, if not it will go to the else if statement */ { Echo "the number is 1&...
1. Variables: $ sign is used for defining the variables in PHP. eg: $var_1 =12. Here the datatype is automatically assigned. You don't have to specify the datatype of a declared variable. echo is...
I assume that you have lamp stack installed in your system. And if you have PHP version lower than 5.1, you have to you have to upgrade it to php5. Step 1: Check the PHP...
Database connection: Connecting mongoDB with php is really simple if your configured php with mongoDB using php driver. Assuming that you have already configured php with mongoDB am going to explain the php script to connect...