Skip to content
  • php@sudheesh.com
Quick Links
  • PHP Questions and Answers
  • Technical Questions and Answers
  • jQuery Tutorials
  • PHP Tutorials
  • jQuery Plugins
  • PHP Frameworks
  • PHP Classes and Objects
  • HTML5 : Fifth major revision of HTML.
  • AngularJS Tutorials
  • PHP Testing and Debugging Tools
PHP Developers
  • Home
  • PHP Tutorials
  • CMS Packages
  • PHP Frameworks
  • Ecommerce Apps
  • Template Engines
  • Libraries/ Add-ons
  • PHP Tools
  • PHP Editors (IDEs)
  • PHP 7
  • HTML 5

How can we create a database using PHP and mysql?

Sudheesh.R

We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.… Read more

PHP Questions and AnswersLeave a comment

For printing out strings, there are echo, print and printf. Explain the differences.

Sudheesh.R

echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you … Read more

PHP Questions and AnswersLeave a comment

I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP?

Sudheesh.R

On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().… Read more

PHP Questions and AnswersLeave a comment

What’s the output of the ucwords function in this example?

Sudheesh.R

Returns a string with the first character of each word in str capitalized, if that character is alphabetic.

$text = ‘hello world!’;
$text = ucwords($text);             // Hello World!… Read more

PHP Questions and AnswersLeave a comment

How can we destroy the session, how can we unset the variable of a session?

Sudheesh.R

session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie. To use the session variables again, session_start() has to be called.

The session_unset() function frees all session variables currently registered.… Read more

PHP Questions and AnswersLeave a comment

What are the different functions in sorting an array?

Sudheesh.R

Sorting functions in PHP:
asort()
arsort()
ksort()
krsort()
uksort()
sort()
natsort()
rsort()… Read more

PHP Questions and AnswersLeave a comment

How can we know the count/number of elements of an array?

Sudheesh.R

2 ways:
a) sizeof($array) – This function is an alias of count()
b) count($urarray) – This function returns the number of elements in an array.
Interestingly if you just pass a simple var instead of an array, count() will return 1.… Read more

PHP Questions and AnswersLeave a comment

How many ways we can pass the variable through the navigation between the pages?

Sudheesh.R

At least 3 ways:

1. Put the variable into session in the first page, and get it back from session in the next page.
2. Put the variable into cookie in the first page, and get it back from the cookie in the next page.
3. Put the variable into … Read more

PHP Questions and AnswersLeave a comment

What is the maximum length of a table name, a database name, or a field name in MySQL?

Sudheesh.R

Database name: 64 characters
Table name: 64 characters
Column name: 64 characters… Read more

PHP Questions and AnswersLeave a comment

How many values can the SET function of MySQL take?

Sudheesh.R

MySQL SET function can take zero or more values, but at the maximum it can take 64 values.… Read more

PHP Questions and AnswersLeave a comment

Posts navigation

Next
Previous

Quick View

WordPress- To create a beautiful website or blog Drupal is an open source content management platform powering millions of websites and applications. Joomla - dynamic portal engine and content management system Magento eCommerce Platforms osCommerce - Open Source online shop e-commerce solution Zen Cart™ truly is the art of e-commerce; free, user-friendly, open source shopping cart software. CS-Cart - Shopping cart solution for building an ecommerce website X-CART- Shopping cart software & ecommerce solutions Pinnacle Cart is an extremely powerful shopping cart and website builder application.

PHP Questions

  • What is PHP ?
  • What is the difference between PHP session and cookie?
  • How can we create a file using php script ?
  • How can we change the first letters to capital letter of “first name” and “last name” from single name string using PHP ?
  • What is the differences between GET and POST methods ?
Technical Questions and Answers

RSS PHP Latest News

PHP Editors [IDE]

  • Zend Studio IDE

    Zend Studio helps to write and maintain PHP code faster, solve problems Read More »

  • NetBeans IDE

    The NetBeans PHP editor provides code templates and code generation tools, such Read More »

jQuery Plugins

PHP Tutorials

  • Start with a simple PHP program.
  • Define a PHP Variable
  • Comments in PHP Code
  • Arithmetic operators in PHP
  • Inbuilt Arithmetic Functions in PHP
  • Assign values using PHP
  • Compare two values using PHP
  • Alternative syntax for if, while loop, for loop, foreach and switch statement
  • Compare two values with Logical operators
  • String Functions in PHP
  • If…Else Statements in PHP
  • While Loops in PHP with example
  • Do While Loops in PHP
  • For Loops in PHP with example
  • Foreach Loops in PHP with example
  • Switch statement in PHP
  • Akelos PHP Framework
  • CakePHP Framework
  • CodeIgniter PHP Framework
  • Fusebox Framework

Tags

Akelos CakePHP CodeIgniter CodeLobster concrete5 CS-Cart Domain Drupal Dwoo eZ Publish FPDF Fusebox ImageMagick Joomla JpGraph Magento NetBeans OpenBiz Open Power osCommerce PEAR PHP phpDesigner PHPDevShell PHPEclipse PhpED PHPEdit phpMyAdmin Php On Trax PhpStorm PRADO QPHP Rapid Seagull Smarty SquirrelMail Symfony Twig TYPO3 WordPress Yii Zen Cart Zend Zend Studio Zoop
jQuery Plugins

PHP TUTORIALS

  • Start with a simple PHP program.
  • Define a PHP Variable
  • Comments in PHP Code
  • Arithmetic operators in PHP
  • Inbuilt Arithmetic Functions in PHP
  • Assign values using PHP
  • Compare two values using PHP
  • Alternative syntax for if, while loop, for loop, foreach and switch statement
  • Compare two values with Logical operators
  • String Functions in PHP
  • If…Else Statements in PHP
  • While Loops in PHP with example
  • Do While Loops in PHP
  • For Loops in PHP with example
  • Foreach Loops in PHP with example
  • Switch statement in PHP
  • Create an array using PHP
  • PHP Array functions
  • The basics of a Class in PHP
  • Global Variables – Superglobals
PHP Questions and Answers PHP Questions and Answers

Categories

Frameworks in PHP

  • The CakePHP framework provides a robust base for your application. It can handle every aspect, from the user’s Read More »

  • CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Read More »

  • Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, DRY design and Read More »

  • Zend Framework extending the art & spirit of PHP, It is based on simplicity, object-oriented best practices, corporate Read More »

PHP Classes & Objects

  • Properties of a PHP Class
  • PHP Class Constants
  • Autoloading Classes in PHP
  • PHP Constructors and Destructors
  • Object Inheritance in PHP
  • Static Keyword in PHP
  • PHP Class Abstraction
  • Object Interfaces in PHP
  • Traits in PHP
  • Magic Methods in PHP
  • Final Keyword in PHP class
  • Object Cloning in PHP
jQuery Tutorials

PHP MySQL Database

  • Connection to the MySQL Server using PHP
  • Create Database using MySQL and PHP
  • Create a Table using MySQL and PHP
  • Insert Data Into a Database Table using MySQL and PHP
  • Select Data From a Database Table using MySQL and PHP
  • MySQL WHERE clause is used to filter records
  • PHP MySQL ORDER BY Keyword
  • Update Data In a Database using PHP and MySQL
  • Delete Data In a Database using PHP and MySQL

PHP Libraries / Add-ons

  • ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) Read More »

  • FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF Read More »

  • JpGraph is an Object-Oriented Graph creating library for PHP = 5.1 The library is completely written in PHP and ready to be used in any PHP Read More »

  • PHPExcel providing a set of classes for the PHP programming language, which allow you to write to and read from different spreadsheet file formats, like Excel Read More »

jQuery Plugins
PHP TUTORIALS
Posted by
Sudheesh.R
User Hits/Visits
4,811,957 (4 Million+)
Last Updated: May 31, 2025

PHP Questions and Answers

  • What is PHP ?
  • What is the difference between PHP session and cookie?
  • How can we create a file using php script ?
  • How can we change the first letters to capital letter of “first name” and “last name” from single name string using PHP ?
  • What is the differences between GET and POST methods ?

Technical Questions and Answers

  • What is a domain name ?
  • What is an IP Address ?
  • What is HTTP ?
  • What is TCP/IP ?
  • What is POP – Post Office Protocol ?
  • What is e-mail address ?
  • What is an e-mail client ?
  • What is a Database server ?
  • What is cloud database ?

HTML5 Tutorials

  • What is HTML5 ?
  • HTML5 Browser Support
  • HTML5 : New features
  • Backward Compatibility in HTML5
  • HTML5 Syntax
  • DOCTYPE in HTML5
  • Character Encoding in HTML5
  • Script tag in HTML5
  • Link tag in HTML5
  • HTML5 basic elements
  • Home
  • PHP Tutorials
  • CMS Packages
  • PHP Frameworks
  • Ecommerce Apps
  • Template Engines
  • Libraries/ Add-ons
  • PHP Tools
  • PHP Editors (IDEs)
  • PHP 7
  • HTML 5
Copyright. All rights reserved. Powered by Sudheesh.R