Featured Post Today
print this page
Latest Post

Some Important Mathematics Fucntions In PHP : 6th Day Lecture


power function

Some Important Mathematics Functions In PHP

Sample 1 : Example of Float.

Absolute Function Code
295
Power Function Code
6561
Square Root Function Code
10
Mod Function Code
6
3.8745
Random Value Function Code
1877
7

 <html lang="en">  
   <head>  
     <title><?php $pagetitle="Some Important Mathematics Functions In PHP : 6th Day Lecture : Samee";  
                          echo $pagetitle; ?></title>  
         <meta name="description" content="<?php echo $pagetitle ?>" />  
         <meta name="robots" value="nofollow, noindex" />  
     <link rel="icon" type="image/ico" href="http://www.iconarchive.com/download/i50954/deleket/3d-cartoon-vol3/Web-Coding.ico" alt="Icon" />  
     <link type="text/css" href="http://www.getacho.com/download/phpcss/stylesheet.css" rel="stylesheet" />  
   </head>  
   <body>  
        <img id="logo" src="http://icons.iconarchive.com/icons/deleket/3d-cartoon-vol3/256/Web-Coding-icon.png" alt="Coding">  
     <h1 align="center">Some Important Mathematics Fucntions In PHP : <a href="http://sameearticles.blogspot.com" target="_blank">Samee Articles</a></h1>  
       <h2 align="left">Sample 1 : Example of Float.</h2>  
         <?php  
                          echo "Absolute Function Code <br />";  
                          echo abs(5 - 300) . "<br />";  
                          echo "Power Function Code <br />";  
                          echo pow(3, 8) . "<br />";  
                          echo "Square Root Function Code <br />";  
                          echo sqrt(100) . "<br />";  
                          echo "Mod Function Code <br />";  
                          echo fmod(20, 7) . "<br />";  
                          echo fmod(3.8745, 40.45523) . "<br />";  
                          echo "Random Value Function Code <br />";  
                          echo rand() . "<br />";  
                          echo rand(5,10) . "<br />";  
         ?>  
   </body>  
 </html>  


0 comments

Float Different Functions In PHP : 6th Day Lecture : Samee



Float Different Functions In PHP

Sample 1 : Example of Float.

float 3.584

Sample 2 : Different Functions Examples to show Float Values

float 3.684
4
3.68
3
4

 <html>  
   <head>  
     <title><?php $pagetitle="Float Different Functions In PHP : 6th Day Lecture : Samee";  
                          echo $pagetitle; ?></title>  
         <meta name="description" content="<?php $pagetitle ?>" />  
         <meta name="robots" value="nofollow, noindex" />  
     <link rel="icon" type="image/ico" href="http://www.iconarchive.com/download/i50954/deleket/3d-cartoon-vol3/Web-Coding.ico" alt="Icon" />  
     <link type="text/css" href="http://www.getacho.com/download/phpcss/stylesheet.css" rel="stylesheet" />  
   </head>  
   <body>  
        <img id="logo" src="http://icons.iconarchive.com/icons/deleket/3d-cartoon-vol3/256/Web-Coding-icon.png" alt="Coding">  
     <h1 align="center">Float Diffirent Functions In PHP : <a href="http://sameearticles.blogspot.com" target="_blank">Samee Articles</a></h1>  
       <h2 align="left">Sample 1 : Example of Float.</h2>  
         <?php  
                          $float=3.58400;  
                           var_dump($float)  
         ?>  
       <h2 align="left">Sample 2 : Different Functions Examples to show Float Values</h2>  
         <?php  
                          $float=3.684000000;  
                           var_dump($float); //It is to show the value is float  
                           echo round($float) . "<br />"; //it is used to increase the value to 4 as mathematics rules.   
                           echo round($float,2) . "<br />"; //it is used to increase the value after point and 2 digit as mathematics rules.  
                           echo floor($float) . "<br />"; //it is used to increase the value according to complete value  
                           echo ceil($float) . "<br />"; //it is used to increase the value to 4 as mathematics rules.   
         ?>  
   </body>  
 </html>  


0 comments

Define Constants in PHP : 6th Day Lecture : Samee


define php constant

Constants In PHP : Samee Articles

Sample 1 : What is Constant in PHP?

Constant is a identifier for a simple value.
The Value can not be changed during the script.
Value starts with letter or underscore, never with dollar sign "$".
It starts with "define."
Constant is default Case Sensitive.

Sample 2 : Constant Example in PHP

My Name is Samee Ullah Feroz.

Sample 3 : Constant Example in PHP

My Nick Name is Sherri Bhai.

 <html>  
   <head>  
     <title>Constants in PHP : 6th Day Lecture : Samee</title>  
     <link rel="icon" type="image/ico" href="http://www.iconarchive.com/download/i50954/deleket/3d-cartoon-vol3/Web-Coding.ico" alt="Icon" />  
     <link type="text/css" href="http://www.getacho.com/download/phpcss/stylesheet.css" rel="stylesheet" />  
     <meta name="robots" value="nofollow, noindex" />  
   </head>  
   <body>  
        <img id="logo" src="http://icons.iconarchive.com/icons/deleket/3d-cartoon-vol3/256/Web-Coding-icon.png" alt="Coding">  
     <h1 align="center">Constants In PHP : <a href="http://sameearticles.blogspot.com" target="_blank">Samee Articles</a></h1>  
       <h2 align="left">Sample 1 : What is Constant in PHP?</h2>  
         <?php  
                          echo 'Constant is a identifier for a simple value. <br /> The Value can not be changed during the script. <br /> Value starts with letter or underscore, never with dollar sign "$". <br /> It starts with "define." <br /> Contant is defauld Case Sansitive.';  
         ?>  
       <h2 align="left">Sample 2 : Constant Example in PHP</h2>  
         <?php  
                          define("name","My Name is Samee Ullah Feroz."); //here it is case sansitive.   
                          echo name;  
                          /*echo Name;*/ //Here is an error due to case sensitivity  
         ?>  
       <h2 align="left">Sample 3 : Constant Example in PHP</h2>  
         <?php  
                          define("name2","My Nick Name is Sherri Bhai.",true); //here it is not case sensitive.   
                          echo Name2; //Here it is not sensitive due to "true" word  
         ?>  
   </body>  
 </html>  


0 comments

Custom Cascading Style Sheet (CSS) Code With Absolute Background Image Code

Custom Cascading Style Sheet (CSS) Code With Absolute Background Image Code
 @charset "utf-8";  
 /* CSS Document for : SameeArticles.Blogspot.com */  
 #logo  
      {  
           width:200px;  
           height:200px;  
           float:right;  
           background-color:#FFFFFF;  
      }  
 html  
      {  
           height:100%;  
           width:100%;  
           background:url(http://www.southsoft.co.za/images/mysql.jpg) center center no-repeat;  
      }  
 h1  
      {  
           background:#00FF00;  
           border-style:dotted;  
           margin-right:200px;  
      }  
 h2  
      {  
           background:#CCCCCC;  
           font-family:Georgia, "Times New Roman", Times, serif;  
           font-size:16px;  
      }  
 a:link   
      {  
           color:#000000;  
           text-decoration:none;  
      }  



Custom Style Sheet with Absolute Background

For Background Image : You can use this code
 html  
      {  
           height:100%;  
           width:100%;  
           background:url(http://www.southsoft.co.za/images/mysql.jpg) center center no-repeat;  
           /* You can also give local file path */  
      }  

Find any image and change with file name.
0 comments

New Custom CSS (Cascading Style Sheet) Layout for php scripts

I was using simple coding without any Cascading Style Sheet (CSS). that's why everything was simple in scripting.
like

Simple Layout
Old Layout
Now I am learning CSS with PHP classes.  I am using Simple Style Sheet Code. Now I am using this Simple Style Sheet Concept.
simple and new layout
New Layout

In this CSS, I am using 2 Images, and some color functionality.
0 comments

Some Important Functions of PHP : 5th Day Lecture of PHP : Samee


php strings

Some Important Functions of PHP

Sample 1 : strpos() Function Usage

As $name2 is "Feroz"
12
it will used to show the value location of starting $name2

Sample 2 : strlen() Function Usage

As $name1 is "Samee Ullah Feroz"
17= it will used to show the lenght of String $name1

Sample 3 : strtolower() Function Usage

samee ullah feroz

Sample 4 : strtoupper() Function Usage

SAMEE ULLAH FEROZ

Sample 5 : ucfirst() Function Usage

Samee ullah feroz

Sample 6 : ucwords() Function Usage

Samee Ullah Feroz

Sample 7 : implode() Function Usage

Samee_Ullah_Feroz

Sample 8 : explode() Function Usage

array (size=3)
  0 => string 'Samee' (length=5)
  1 => string 'Ullah' (length=5)
  2 => string 'Feroz' (length=5)

Sample 9 : substr() Function Usage


Ullah Feroz
Feroz
oz

Samee Ullah Feroz
Feroz
eroz
e Ullah Feroz

 <html>  
   <head>  
     <title>Some Important Functions of PHP : 5th Day Lecture : Samee</title>  
     <link rel="icon" type="image/ico" href="http://www.iconarchive.com/download/i50954/deleket/3d-cartoon-vol3/Web-Coding.ico" alt="Icon" />  
     <link type="text/css" href="http://www.getacho.com/download/phpcss/stylesheet.css" rel="stylesheet" />  
   </head>  
   <body>  
        <img id="logo" src="http://icons.iconarchive.com/icons/deleket/3d-cartoon-vol3/256/Web-Coding-icon.png" alt="Coding">  
     <h1 align="center">Some Important Functions of PHP : <a href="http://sameearticles.blogspot.com" target="_blank">Samee Articles</a></h1>  
       <h2 align="left">Sample 1 : strpos() Function Usage</h2>  
         <?php  
                          $name1 = "Samee Ullah Feroz";  
                          $name2 = "Feroz";  
                          echo 'As $name2 is "Feroz"<br />';  
                          echo strpos($name1, $name2) . "<br />it will used to show the value location of starting \$name2"  
         ?>  
       <h2 align="left">Sample 2 : strlen() Function Usage</h2>  
         <?php  
                          $name1 = "Samee Ullah Feroz";  
                          $name2 = "Feroz";  
                          echo 'As $name1 is "Samee Ullah Feroz"<br />';  
                          echo strlen("$name1") . "=\tit will used to show the lenght of String \$name1";  
                          //And We can also write Full Name in the place of $name1 and also we can write string either with double qoutes or without qoutes  
         ?>  
       <h2 align="left">Sample 3 : strtolower() Function Usage</h2>  
         <?php  
                          $name1 = "Samee Ullah Feroz";  
                          $name2 = "Feroz";  
                          echo strtolower($name1); //As it is used to convert all letters to lower case.  
         ?>  
       <h2 align="left">Sample 4 : strtoupper() Function Usage</h2>  
         <?php  
                          $name1 = "Samee Ullah Feroz";  
                          $name2 = "Feroz";  
                          echo strtoupper($name1); //As it is used to Convert all letters to upper case (Capital Letters)  
         ?>  
       <h2 align="left">Sample 5 : ucfirst() Function Usage</h2>  
         <?php  
                          $name1 = "samee ullah feroz";  
                          $name2 = "Feroz";  
                          echo ucfirst($name1); //As it is used to Convert 1st letter to upper case (Capital Letter)  
         ?>  
       <h2 align="left">Sample 6 : ucwords() Function Usage</h2>  
         <?php  
                          $name1 = "samee ullah feroz";  
                          $name2 = "Feroz";  
                          echo ucwords($name1); //As it is used to Convert each 1st letter to upper case (Capital Letters)  
         ?>  
       <h2 align="left">Sample 7 : implode() Function Usage</h2>  
         <?php  
                          $name1 = array("Samee","Ullah","Feroz");  
                          $name2 = "Feroz";  
                          echo implode("_",$name1); //As it is used to join the array values and add specific charactor among each value.  
         ?>  
       <h2 align="left">Sample 8 : explode() Function Usage</h2>  
         <?php  
                          $name1 = "Samee Ullah Feroz";  
                          $name2 = "Feroz";  
                          $name3 = explode(" ",$name1);  
                          var_dump($name3);  
         ?>  
       <h2 align="left">Sample 9 : substr() Function Usage</h2>  
         <?php  
                          echo substr("Samee Ullah Feroz",18)."<br />";  
                          echo substr("Samee Ullah Feroz",6)."<br />";  
                          echo substr("Samee Ullah Feroz",11)."<br />";  
                          echo substr("Samee Ullah Feroz",15)."<br />";  
                          echo "<br>";  
                          // Negative numbers:  
                          echo substr("Samee Ullah Feroz",-18)."<br />";  
                          echo substr("Samee Ullah Feroz",-6)."<br />";  
                          echo substr("Samee Ullah Feroz",-4)."<br />";  
                          echo substr("Samee Ullah Feroz",-13)."<br />";  
         ?>  
   </body>  
 </html>  


0 comments
 
Copyright © 2011-2026. Samee Articles - All Rights Reserved
Proudly powered by Blogger