MailChimp PHP MailChimp is the most famous online email marketing software and is offered free of cost. It allows the user to subscribe and send newsletter in bulk to them. It also manages your subscriber’s lists. MailChimp makes it easy ...
phpsupport | phpsupportdesk Latest Articles
How to generate an API key from mailchimp account?
pHpSupportYou would have to follow the following steps Login to your mailchimp account. After Login, on the top right corner before Help, you will see your account name with down arrow. Click on that. You will see an option of ...
What is REST API?
pHpSupportREST API REST stands for ‘Representational State Transfer’. It’s an architectural style and an approach to communication for the developement of web services. Roy Fielding in 2000 first introduced REST. REST basically uses HTTP protocol for data communication. It’s main focus ...
How to install MongoDB with easy steps
pHpSupportIn this digital era, things are moving very vast and for making thing vast technology is playing main role. Proving this term, new technologies are coming with more fast and sharp features, like: MongoDB. MongoDB is playing a vast role ...
How to Install MongoDB PHP Driver in your localhost windows machine with PHP?
pHpSupportDownload the php_mongo.dll file from internet (http://pecl.php.net/package/mongodb/1.1.6/windows) Put this file in your php extension directory. Add the following line in php.ini file: extension=php_mongo.dll Restart Apache Server. You are all set now.
PHP DB Connect
pHpSupportHow to create a connection with MySQL? Use mysqli_connect("host", "username", "password"); How to connect to database? Use mysqli_select_db("databasename", "connection"); How to insert data into MySQL database using PHP? We can run MySQL query using mysqli_query Use : mysqli_query("connection", "MySQL Query"); ...
Arrays
pHpSupportArrays are used to store many values in single variables. Eg. Name of fruits In Php, array can be declared as the following Array($val1, $val2); Please check the following screenshot CODE <?php $fruitNames = array("Grapes","Banana","Papaya","Mango"); echo $fruitNames[0]; ?> OUTPUT IS ...
Operators
pHpSupportFor Addition use + Eg. $a + $b For Subtraction use – Eg. $a – $b For Multiplication use * Eg. $a * $b For Division use / Eg. $a / $b For getting remainder of division (modulus) Eg. $a ...
Conditional Statements
pHpSupportIn php, following are the conditional statements If statement If else statement If elseif statement Switch statement if ($condition) { echo “”; } CODE – If statement <?php $str = “God is one”; if(isset($str)) { echo “This variable is set”; ...
String Functions
pHpSupportA String is simply a sequence of characters like ‘THIS IS PHP!’. PHP contains a huge variety of string functions. The PHP string functions basically is an important part of the PHP Core. PHP contains near about one hundred string ...
Data Types
pHpSupportPHP supports the following data types String Float(Double) Integer Boolean Array NULL Resource Object <?php Echo “This is nice”; // this is an example of string Echo 1; // this is an example of integer Echo -1; // this is ...
Variables
pHpSupportVariable Every variable starts with "$" eg. Assignment of a string to a variable. $var = "God is a power"; <?php $var = "God is a power"; echo $var; // To print a variable value ?> If you will see ...
Include & Require
pHpSupportHow to include other PHP file in your current file You can use the content from one PHP file to another. Include("filename.php"); Here filename.php is present on the same path as the file in which you are currently working. ...
Constants
pHpSupportConstants This returns the value of the constant. Constant in PHP can be declared by using keyword “define” Eg. define(“MAXLENGTH”, “100”); CODE <?php define(“MAXLENGTH”, “100”); echo MAXLENGTH; ?> OUTPUT We can define the constants in the config file of the ...
Time Functions
pHpSupportStrtotime It converts the date into unix time stamp format. <?php echo $dateTime=strtotime(“13-02-2016”); ?> OUTPUT To add no. of days in current date <?php $currDate = date(‘Y-m-d’) ; // 2016-04-02 $dateTime=strtotime(“$currDate + 5 days”); echo date(“Y-m-d”, $dateTime); ?> OUTPUT You ...