Posts

PHP-Local Variables

Local Variables: - <?php function my_fun(){ $value1=100; $value2=50; echo "$value1"; } my_fun(); echo $value2; ?>

PHP-Static Variable

Static Variable program in php: - <?php function myTest(){ static $x=100; echo $x."<br>"; $x++; } myTest(); myTest(); myTest(); ?>

PHP-Variables and Data Types | How to Use Variables in PHP | PHP Data Types

Variables and Data Types in PHP: - To Store Different Data in a Variable. PHP supports the Following Data Types. String (String is a sequence of Characters) String can be any text inside the code exp : $name="Visually Teach"; Integer none decimal Numbers Integer formats are :  Decimals Hexadecimals octal Exp: $my_Age=30; Float (Floating point number - also called double) Floating is number with decimal points / Double Numbers. exp: - $my_GPA=9.7; Boolean A Boolean represents two things : TRUE or FALSE. Booleans used in conditional testing. Exp:   $x = true; $y = false; Array: - To stores multiple values in one single variable Exp: $courses=array("Graphic Application","Web Application","Digital Marketing"); When you Print: - echo $courses[0] . ", " . $courses[1] . " and " . $courses[2] . "." Array Types : - There are three types of arrays: I

PHP-ECHO

How to Print value in PHP By using Echo and Print command: - echo Method: - <?php echo "Welcome to PHP Program"."<br>"; echo "<br>"; echo "am from echo method"; ?> Output: - Welcome to PHP Program am from echo method Print Method: - <?php print "Hello am from print method"; ?> Output: - Hello am from print method

JQUERY-BANNER-FADEIN AND FADEOUT

<!doctype html> <html> <head> <meta charset="utf-8"> <title>Creating a Banner by using jquery </title> <style> *{ border:0px; padding:0px; margin:0px; } div#dynamic_banner figure img { width:100%; height:600px; position:absolute; } div#dynamic_banner .buttons { position:absolute; z-index:1000; top:550px; left:0px; width:100%; } div#dynamic_banner .buttons input[type=button]{ width:24%; height:50px; line-height:50px; text-align:center; background:rgba(255,255,255,0.5); font-size:18px; } </style> <script src="jquery.js"></script> </head> <body>     <div id="dynamic_banner">         <figure>     <img src="images/1.jpg" id="img_gp">     <img src="images/2.jpg" id="img_wp">     <img src="images/3.jpg" id="img_dm">     <img src="images/4.jpg" i

JAVASCRIPT-CHANGE BGCOLOR BY USING TIME

<html> <head> <title>bgcolor change by time </title> <style type="text/css"> p{ line-height:40px; color:#000000; background-color:#00ff00; } </style> <script language="JavaScript"> colors=new Array("red","orange","green","silver") colorIndex=0 function changeColor() { document.bgColor=colors[colorIndex] colorIndex=(colorIndex+1) % colors.length } function startColorChange() { setInterval("changeColor()",3000) } window.onload=startColorChange </script> </head> <body bgcolor=white> <p>the change the Bgcolor every 3 sec.</p> </body> </html>