Tag Archives: interview questions in php

Retrieve/get the data from mysql database

Using select statement we can fetch the data from mysql table. here we will use 2 function to fetch the data .first is mysql_query() to execute query and mysql_fetch_array() to return the data. this will return data as associative,numeric,or as both. if you use second parameter/argument in mysql_fetch_array() as MYSQL_ASSOC- it will return array as… Read More »

Select mysql database using php

using the below function to select a database Syntax —– bool mysql_select_db($databasename,$connection); $databasename- Name of the Database you want to select $connection– connection string you are getting after executing mysql_connect Example ——-

Basename in php

This function will return the trailing name component of path Syntax —— string basename( string $path[, string $suffix]) example ——–

output as below 1) mydoubts 2) hello 3) vasanthan 4) . 5)