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 up the position using the x, y … [Read more...] about PhP Simulation Script Using Conditional Statements.
1. If, else and ifelse:[crayon-5ba5ca73b842f734103043/]2. Conditional statement using ternary operators:[crayon-5ba5ca73b8443617168282/]3. For loop:[crayon-5ba5ca73b844b549785737/]4. Switch Statement: Switch statement is a better version of if … [Read more...] about Conditional Statements in PhP
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 used to output the results.2. Changing a … [Read more...] about Variables, Type casting ,Concatination and Constants in PhP
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 info if the PDO driver is already installed. It will be automatically … [Read more...] about How To Configure PDO Mysql Driver On Ubuntu
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 mongoDB. For … [Read more...] about MongoDB and Php Beginner Tutorials
Converting a .pem to .ppk format is a matter of one line code. First, you need to have puttygen installed on your system to convert pem to ppk. Step1: Install puttygen by issuing the following command in … [Read more...] about How To Convert .Pem File To .ppk Usign Puttygen On Ubuntu