What is an array in php?
Answer / Sitesh Kumar
An array in PHP is a collection of values that are indexed. You can store different types of data, such as numbers, strings, and objects, in an array. To create an array, you can use curly braces {} or square brackets []. Here is an example: nn$arr = ['Apple', 'Banana', 'Cherry'];
| Is This Answer Correct ? | 0 Yes | 0 No |
What is design pattern? Explain all including singleton pattern?
What are the different errors in php?
What is env in laravel?
What is api laravel?
Explain the types of string comparision function in PHP
<?php /** * @version 1.0 $ * @package HelloWorld * @copyright (C) 2005 Andrew Eddie * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL */ /** ensure this file is being included by a parent file */ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?> <?php $database =& JFactory::getDBO(); //$sql = 'SELECT name, username FROM #__users'; $sql="select a.id, a.title, a.introtext, a.created_by, a.created from jos_content a, jos_content_frontpage b where a.id=b.content_id and b.ordering='2'"; $database->setQuery( $sql ); $user = NULL; $user = $database->loadObject(); //echo 'Name: ' . $user->name . '<br />'; echo '<h1>' . $user->title . '</h1><br />'; //echo 'Username: ' . $user->username; echo ' ' . $user->introtext; i write this and fetch the result from the database the result is The Intranet is up and working ! Our intranet is up and working and should be accessible from both Mumbai and NOIDA. As you will notice, this template, look & feel is not in line with our corporate indentity but we chose the route of "form-follows-funtion" In the first phase, we are rolling out functionality that is critical to all of us - Policies and How-to documents. In subsequent phases, we will be launching other features. Keep watching this space for more details i want to see only 4 line of top then how this may done
How can we register the variables into a session?
What are the Merits and De-Merits of CURL library ?
Does browser understand php?
What does php exit do?
What is the best practice for running mysql queries in php? Consider the risk of sql injection.
How to delete an element from an array?