Most useful function of php:
=> rand() --------- that is except value randomly not from user.
Exam: code
<?php
$rand= rand();
echo $rand;
?>
output: 21417
=> getrandmax() ------------ that is except maximum value.
<?php ob_start(); ?>
<h1> my page</h1>
<?php
$redirect_page='http://google.com';
$redirect=false;
if($redirect==true){
header('Location: '.$redirect_page);
}
ob_end_flush();
?>
Exam: code
<?php
$rand= rand();
echo $rand;
?>
output: 21417
=> getrandmax() ------------ that is except maximum value.
<?php ob_start(); ?>
<h1> my page</h1>
<?php
$redirect_page='http://google.com';
$redirect=false;
if($redirect==true){
header('Location: '.$redirect_page);
}
ob_end_flush();
?>
No comments:
Post a Comment