Inline CSS is inserting unique style in a single HTML Element. You use the Inline CSS STYLE to apply a Style on Single HTML Element. To use the Inline CSS, add the Style attribute to the relevant HTML Tag. Let us do some Examples and see that in Action.
<div style="height:200px; color:white; background-color:green">
This is an Example of In-line Styling applied on Div Tag
Continue reading what is inline CSS
CSS is an abbreviation word and stands for cascading Style Sheets for Web pages. Cascading ->means the way CSS applies one Style on top of another Style Style Sheets control the look and feel of Web Pages CCS is how HTML elements appears on Screens and other Media devices. CSS and HTML work together hand in hand. HTML sorts out the Page Structure, while CSS defines how the HTML elements are displayed on the Page. Learning CSS is learning how to design the feel and the look of Web pages and for that you need to know the Structure … Continue reading CSS stands for cascading Style Sheets.
An exception is an Error thrown by the application you are trying to execute. Exception handing is an object oriented approach in the PHP Language. An exception is an object thrown out by your application in the even when some … Continue reading Basic exception handling with PHP
multidimensional-array is an array element which can contain another array as a value, which in turn can hold other arrays as well. Each location in the array can hold another array. multidimensional-arrays can be two-dimensional or three-dimensional array. Example, We have this following user’s table, which holds our user’s information, their Usernames, E-mails and Countries of origin. Username E-mail Country Jordan firstname.lastname@example.org USA Beckham email@example.com UK Uhurukenyata firstname.lastname@example.org Kenya Now we need to represent our table in array using PHP. Example ⇓ multidimensional-arrays We will first create an array of users, which is two-dimensional. <!DOCTYPE html> <html> … Continue reading Learn how to create and access PHP multidimensional arrays
Anonymous Functions have no given function name unlike normal functions, this is also known as closures. You will mostly use Anonymous Functions in other php functions as parameters, (callback parameters) Some PHP functions use a function as parameter or as callback function to do part of their work. Let us see show cases here the usort() function sorts an array by values using a user-defined comparison function. Forexample, the usort() function takes two parameters , the array to be sorted and a callable $value_compare_func respectively. This second paramter (the user defined comparison function) gives you the possibilitiy to tell the … Continue reading PHP Anonymous Functions
__FILE__, __DIR__, __FUNCTION__, __CLASS__, __METHOD__, __TRAIT__ and __NAMESPACE__ PHP Magic Contants : Here are eight magical constants in PHP that change depending on where they are used.Some of these magical constants may provide useful information both within object-oriented programs as well as within procedural programs. The __FILE__ constant is the current filename, __LINE__ is the current line number, __FUNCTION__ is the current function name, __METHOD__ is the current method name (if any), and __CLASS__ is the current class name (if any). Starting with PHP 5.3.0, __DIR__ is the directory that__FILE__ is in and __NAMESPACE__ is the current name‐ space. … Continue reading php magic constants
constants in php A constant in PHP is defined or declared by using define() function or by using the const keyword outside a class definition if you are using PHP 5.3.0. or a later version. If you define a constant one time, you can never change it or undefine it again. your constants can only contain boolean, integer, float and string (So called Scalar Data) . Global constants in PHP is assigned through the define() function Example ⇓ Global Constants <!DOCTYPE html> <html> <body> <?php define(“CONSTANT”, “Hello WebWideTutor!”); echo CONSTANT; ?> </body> </html> … Continue reading constants in php
Elements in HTML5 HTML5 comes with several elements which breaks a single document into multiple small contents that may be either related or independent. These elements add semantic richness to our markup, and make it easier to re-purpose our documents across media and devices.
<title>HTML5 is the future</title>
<meta name="description" content="The HTML5 spirit">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="css/styles.css">
<!--[if lt IE 9]>
Content of the page
How to define HTML5 page structure The Doctyp First, we have the Document Type Declaration, or doctype. This tells our browser or any other Parser what type of document it’s dealing with. It also detects the specific version of the HTML page.The doctype should be declared before any other writing of HTML in File. … Continue reading Basics of HTML5
You want to remove the first or last n characters from a string, use substr() The substr() function ist often when you need to slice off the required number of characters from the beginning or end of the string. The substr() function gives you the possibility to slice and dice strings into smaller strings. It accepts three arguments, of which the last is optional: the string to act on, the position to begin slicing at, and the number of characters to return from its start position. A negative value for the third argument tells PHP to remove characters from the end … Continue reading php string slice truncate any character in word or in a text
PHP How to Change Strings.Changing and Manipulate Strings in PHP by using PHP Built-in Functions, strtoupper() ,strtolower() ,strrev() ,ucfirst(), ucwords() and str_replace() You want to force a string to uppercase, meaning you want to capitalize a string. You can achieve that using the strtoupper() strtoupper function changes every letter of a string to capital letter. Usage: the function takes one string as a parameter input and returns a capitalized string. <?php $string = ‘arsenal is in good shape now’; echo strtoupper($string); ?> Output : ARSENAL IS IN GOOD SHAPE NOW You want to force a string to lowercase, meaning you … Continue reading PHP Change String value behaviour or look