|
Displaying 1 - 50 of about 5191 Related Tutorials.
|
What is the use of Print or Echo Function in PHP?
What is the use of Print or Echo Function in PHP? Hi,
Can anyone explain what is the use of print or Echo function in PHP? Please provide online... or Echo Function in PHP are same. But on comparing we can say that echo function |
echo- Not a function
echo- Not a function
In php generally we use echo command to print something. echo is not a
function...:
This is multiple line
Example:
<?php
echo "Hello world"."<br/>" |
PHP Echo Function
PHP Echo Function
As you know echo () is one of the function of php, which... the echo function as given below…
<php
Echo “hi how are you... to it. And just write “echo $variablename;
PHP Echo Function Example:
<php |
|
|
Print or Echo Functions in PHP
Print or Echo Function in PHP
Although the use of both Print and Echo are same, but it has been seen that people uses echo command more then the print... time to process.
Lets take an example of print and echo command:
<?php
print |
PHP Echo Variables
PHP Variables Echo
PHP Echo() Function is used to display the output of your... be enclosed within parenthesis. Echo() doesn't react like a function... outputs can be through only one echo() command. For example :
<?php |
|
|
If function in PHP
If function in PHP Hi,
Provide me the example of If function in PHP.
Thanks
Hi,
If function is PHP is used to check for some condition and the execute a block of code.
He is an example of if() function in PHP |
javascript echo php
javascript echo php i would like to know the complete syntax with the running example of using JavaScript echo in PHP.
Thanks |
PHP Introduction to PHP Echo and print Tutorial
functions:
<?php function foo()
{
echo "....
The next method of outputting to a webpage is the echo() function. It is
used...Ok, this is a basic tutorial to help people just getting started with PHP |
PHP idate() Function
help related to PHP idate() Function. I waiting for your valuable suggestion.
Thanks,
Hi,
The idate() Function in PHP will returns a string... time if no timestamp is given.
Syntax of PHP idate() Function :...
int idate |
Eval () PHP Function, Example of Eval () PHP Function
PHP eval() Function
In this tutorial we will learn about the PHP eval() function. The php eval()
function can be used if you want to store the php command... eval() function:
The PHP eval() function evaluates the passed string parameter |
PHP basename() function, PHP basename function example
In this section we will learn about the basename() function of php
This example of basename() function in PHP
Description about PHP basename():
syntax for PHP basename()Function
string basename ( string |
The fgetcsv function example in PHP, fgetcsv php, fgetcsv in php
Examples of fgetcsv() function in php
Description
The PHP fgetcsv() function is used to parse the CVS file in PHP program. Here you will see how you... on failure and EOF.
Code for PHP fgetcsv() Function in PHP
<?php
$file1 |
feof() Function in php
Examples of the feof() function in PHP
Syntax on feof() function in PHP... and then the loop will terminate
Code for feof() function in PHP
<?php...=fgets($file1);
echo $line;
echo "<br/>";
}
while(!feof |
PHP Variable Outside Function
PHP Variable Outside Function
In PHP Functions, a variable can be called... the example to understand how it works :
PHP Variable Outside Function Example 1....!";
function msg()
{
echo $text;
}
msg();
?> |
PHP is_executable() Function and example
Syntax
bool is_executable(file_name)
Find the PHP is_executable() function states whether the given file is executable or not
Example of PHP is_executable Fu
Code
<?php
if (is_executable("c |
PHP function ftruncate and example
.
PHP ftruncate() Function Example
Code
<?php
$file1=fopen("bb.txt","r");
echo "file size is
".filesize("bb.txt");
ftruncate($file1,100);
echo...Syntax
int ftruncate(file_handle,length)
ftruncate function truncates |
PHP filesize() function and example
Syntax
int filesize(file_name)
It gives the size in bytes.
Example of filesize() Function in PHP
<?php
$size=filesize("c:/rose1/ram.txt");
echo "size
is ".$size |
PHP strtotime, PHP strtotime Function, strtotime Function, strtotime Function Example
the return value.
Here is the examples of strtotime() function:
<?php
echo...PHP strtotime Function
In this section we will learn strtotime with the help... unix time stamp.
<?php
echo strtotime("10 January 2010");
?> |
PHP function ftell() with example
Syntax
int ftell(file_handle)
ftell() function gives the current position of the file pointer.
using the file handler in bytes.
Example of PHP ftell() Function
Code
<?php
$file=fopen("roseindia.txt","r");
echo ftell |
PHP is_writable Function with example
Syntax for PHP is_writable Function
bool is_writable(file_name)
It states whether the given file is a writable file or not.
Example of PHP is_writable Function
Code
<?php
$a=is_writable("c |
PHP Function
;?php
function
add($a,$b){
return
$a+$b;}
$c=add(12,39);
echo
"... manageable, robust.
A general format of the function in PHP is as follows...;
Example:
<?php
function
fact($b){
if($b==1)
return
1;
else
return($b |
PHP lstat() function and example
Syntax for PHP Istat() Function
array lstat
(file_name)
PHP Istat() Function states about the regular file and symbolic file information
PHP Istat() Function will returns the data in Array form
PHP Istat() Function |
The PHP fileatime() function , fileatime php, fileatime in php
for fileatime() Function PHP
<?php
$time = time();
echo "current date...
Example of fileatime() function in PHP
Description
Syntax for fileatime() Function PHP
int fileatime ( file_name )
It returns Last Access time in int |
PHP filemtime() Function and examples
form of the file
Use Date() function to change it to proper format
PHP filemtime() function Example
<?php
$time = time();
echo "current date and times is ".date("m/d/y H:i:s ",
$time |
PHP fseek() function and example
with offset),
SEEK_END (Makes position to EOF with offset )
Example of PHP fseek() Function PHP
Code code for fseek() Function in PHP
<?php
$file=fopen("roseindia.txt","r");
echo fread($file,240);
echo "<br>< |
PHP Date function
PHP Date Function
In this section we will show you the different formatting options available in the PHP Date function
PHP date() function provides many... using date function as follows:</b>*/
echo ("<br>" |
PHP function fopen and example
of PHP fopen() Function
Code for PHP fopen() Function
<?php
 ...; if(!$file1)
echo "file is
not existing ";
else
echo " |
PHP date function
PHP Date() Function
PHP Date() function is used to display the date and time in a précised
format. With the help of PHP date function you can format... Current Date?
A. <?php echo
date('y m d');
?>
B. <?php echo
date('Y |
The strlen() function
The strlen() function
The strlen() function is used to find the length of a string.
Syntax is given below :
strlen(string)
The below example gives you a clear idea :
Example :
<?php
echo strlen("Welcome |
PHP date add function
PHP Add Date function - date_add or DateTime::add function
The date_add function or DateTime::add function adds an amount of days, months, years, hours and seconds to a DateTime object. This function works in PHP 5.3.0 and above |
PHP fscanf() function and example
.
But if two parameter is used then it returns array
Example of PHP fscant() Function PHP
Code for PHP fsscant() Unction PHP
<?php
 ...;$... ] )
fscanf() function reads the contents of the file according
to the given |
The PHP Date() Function
The PHP Date() Function
The PHP date() function is used for formatting... formatting. For example:
<?php
echo date("Y/m/d") . "<br />... date and time. No installation is necessary for using this function.
Syntax |
PHP function is_file() and example
bool_is_file function states whether the given file
is regular file or not
Syntax
bool is_file(file_name)
Example of PHP is_file() PHP
Code
<?php
$a=is_file("bb.txt");
  |
PHP Function
:
<?php
function
add($a,$b){
return
$a+$b;}
$c=add(12,39);
echo...;
Example:
<?php
function
fact($b){
if($b==1)
return
1;
else... function helps us a lot. A function is a set of coding within a block, which has |
Function fclose() in php, PHP Close file, fclose php
The example of fclose() function in php.
If you have opened any file...() Function in PHP
<?php
$file=fopen("c:/xampp/htdocs/aa.php"... the file pointer. The fclose() function is used to close the find pointer.
Syntax |
PHP rename() function and examples
Syntax of PHP rename() Function
bool rename(file_name,new_name[,context])
rename() function changes the name(renames)of the given file or the directory
Example of PHP rename() Function
Code for PHP rename() Function
< |
PHP function rmdir and example
Syntax for PHP rmdir() Function
bool rmdir(dir_name[,context])
rmdir... Boolean value
Example of PHP rmdir() Function
Source Code of PHP rmdir() Function
<?php
$a=rmdir("upload1");
  |
PHP Polymorphism Function
:
<?php
class A{
function
Disp(){
echo
"Inside the Base class<...PHP Polymorphism Function:
The PHP Polymorphism Method is one of the feature...
Run time
Compile time polymorphism PHP is like function overloading, operator |
PHP flock() Function and Example
processes when the file
has lock
Example of PHP Flock() Function
Code for flock() function PHP
<?php
$file = fopen("c:/rose1/ram.txt","w...
echo "locking
problem in file";
?>
Output
ram.txt is not cotaining |
PHP function is_readable() and example
Syntax for PHP is_readable() Function
bool is_readable(file_name)
The PHP is_readable function states whether the given file is readable or not
Example of PHP is_readable() Function
Code
<?php
  |
PHP dirname() Function, PHP dirname(), dirname php
In this example we will explain the use of dirname() function in PHP... of PHP dirmane()Function
String dirname ($path )
It returns the directory name of the specified file.
Code dirmane()Function in PHP
<?php
$dir1 |
PHP function is_uploaded_file() and example
Syntax for PHP is_uploaded_file() Function
bool is_uploaded_file
(file_name... POST protoocol or not.
Example of PHP is_uploaded_file() Function
Code of PHP is_uploaded_file() Function
<?php
$b1 |
The $_Request Function
are contained by the PHP
built-in $_REQUEST function. $_REQUEST Method is used...;?php echo $_REQUEST["name"]; ?><br />
Address :<?php echo... echo $_REQUEST["name"]; ?>.<br />
Address :<?php echo |
Example of fputs() function in PHP
.
Example of PHP fputs() Function
<?php
$file=fopen("c:/rose1/ram.txt","r");
echo "before using
fputs<br>";
echo fread($file,100);
  |
PHP fwrite() Function & example
is opened in read form
Example of PHP fwrite() Function
Code
<?php
$file=fopen("aa.txt","a+");
echo file_get...() function writes to the file with the given data
string by using the file handle |
The file function example in PHP, file php, file in php
In this php tutorial section we will be learning the file() function of PHP...() function in PHP
array file ( filename, [,flags [, context]] )
It returns...,FILE_SKIP_EMPTY_LINES,FILE_TEXT,
stream_context_create() function creates  |
PHP fpassthru() function and example
the rewind() function
Example of PHP fpassthru() Function
Code for PHP fpassthru() Function
<?php
$file=fopen("c:/rose1/ram.txt","r...; echo $data1;
?>
Output
second line third line fourth line |
The filectime() function, filectime php, filectime() in php
to date format by date function
And FALSE if no changes
Code of filectime() in PHP
<?php
$time = time();
echo "current date and times...
Example of filectime() in PHP
Description
Syntax of filectime() in PHP |
PHP Function Arguments
of the variable.
PHP Function Arguments Example:
<?php
function...
$a=14;
$b=34;
echo "Before calling the
function:<br/>"...:
$a= 14 $b= 34
After calling the function:
$a= 34 $b= 14
Example:
<?php |
The strpos() function
:
Example :
<?php
echo strpos("Hello PHP!","PHP");
?>...The strpos() function
The strpos() function is used to find the availability of a sub string/string
inside a string.
This function returns FALSE |