Tag Archives: PHP

Create a CSV file using PHP and MYSQL

As we know that CSV files are one of the most used way to back-up mysql database and tables. However it is very simple to export or backup your mysql database table as CSV file if you have PhpMyAdmin interface installed on your server. Actually problem arises when we have to deal with a shared…

Advertisements

Leave a comment

Filed under PHP

Swapping Array Keys and Values

In this article we discuss about Swapping Array Keys and Values.
If you want interchange the keys and values of an associative array. It’s very easy, just use PHP’s array_flip() function which perform a very specialized task. It reverses the key-value relationship for all the elements of an asso…

Leave a comment

Filed under PHP

XML file using PHP SimpleXML

Sometimes you want to alter the value of a node or an attribute in an xml document. You can read the XML file using PHP’s SimpleXML to  assign new values to elements or attribute and save the changes back to the file.
<?php
$xml = simplexml_load_file(“data.xml”);
/* Aletr value of a node */

Leave a comment

Filed under SEO

Swapping Array Keys and Values

If you want Swapping Array Keys and Values. It’s very easy, just use PHP’s array_flip() function which perform a very specialized task. It reverses the key-value relationship for all the elements of an associative array and returning a new array that is the mirror image of the ori…

Leave a comment

Filed under PHP

Php Interview Questions and Answers – Part 8

Php Interview Questions and Answers – Part 8
1- Give the syntax of REVOKE commands?
The generic syntax for revoke is as following
REVOKE [rights] on [database] FROM [username@hostname]
Now rights can be:
a) ALL privileges
b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.
We c…

Leave a comment

Filed under PHP

PHP Security

When it comes to PHP, some 99% of amateur sites and 60-70% of all sites use the professional scripting language called PHP. But is it safe to use PHP? Does the implementation of the language not have any gaps that are critical to the operation of our applications? But remember that security…

Leave a comment

Filed under PHP

Create Database and Tables in PHP MySQL

As We know database holds one or multiple tables. Here in this post you will learn how create database tables in Mysql
Create a Database
We use the CREATE DATABASE statement to create a database in MySQL.
Syntax
CREATE DATABASE database_name
To get PHP to execute the MYSQL statement we must use…

Leave a comment

Filed under PHP