PHP string function helps us to manipulate string in various ways. There are various types of string function available. Here we discuss some important functions and its use with examples.
PHP string function helps us to manipulate string in various ways. There are various types of string function available. Here we discuss some important functions and its use with examples.
PHP stands for “PHP: Hypertext Preprocessor”. It is very good for creating dynamic content. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
Loops execute a block of code a specified number of times, or while a specified condition is true.
Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script we can use loops to perform a task like this.
In PHP, we have the following looping statements:
while - loops through a block of code while a specified condition is true
do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true
for - loops through a block of code a specified number of times
foreach - loops through a block of code for each element in an array
PHP stands for “PHP: Hypertext Preprocessor”. It is very good for creating dynamic content. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
Loops execute a block of code a specified number of times, or while a specified condition is true.
Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script we can use loops to perform a task like this.
In PHP, we have the following looping statements:
while - loops through a block of code while a specified condition is true
do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true
for - loops through a block of code a specified number of times
foreach - loops through a block of code for each element in an array
The objective of the Level 5 Diploma in Information Technology is to provide learners with an excellent foundation for a career in a range of organisations. It designed to ensure that each learner is ‘business ready’: a confident, independent thinker with a detailed knowledge of Information Technology, and equipped with the skills to adapt rapidly to change.
This is a presentation on Arrays, one of the most important topics on Data Structures and algorithms. Anyone who is new to DSA or wants to have a theoretical understanding of the same can refer to it :D
Data Type is a basic classification which identifies.docxtheodorelove43763
Data Type is a basic classification which identifies different types of data.Data Types helps in:Determining the possible values of a variablePossible operations which can be executed on the typeMeaning of the dataDifferent ways to store the data
Data Types are of different types:
Primitive data Types
Composite Data Types
*
Primitive data types are those data types which are not defined in terms of other data types.
Examples are:
Integer
Floating Point
Boolean
Character
*
NOTE: primitive here is not the same as how we use it when referring to the primitive types in Java even though they are mostly the same types. By primitive, we mean directly supported by hardware. Strings do not appear in this list because strings are rarely supported directly in hardware, instead they are stored as individual characters and linked together through some mechanism implemented by the programming language (usually as arrays of characters).
What about pointer types? You’ll notice that they do not appear above. Typically, pointers are just unsigned int values. But we treat pointers differently than ints because we do not permit pointer arithmetic (except in a few languages) and require dereferencing of some kind. Dereferencing may be directly supported in hardware by having indirect addressing modes.
Integers are used to hold integer values only.This is further categorized into:
byte
short
int
long
signed
Unsigned
Examples are:
unsigned int x = 21234;
unsigned int y = 31234;
unsigned int z;
z = x + y;
This data type contains decimal points.Examples are:
float f = 20.0 / 3.0;
Current standard version of floating-point
Single-precision (float)
One word: 1 sign bit, 23 bit fraction, 8 bit exponent
Positive range: 1.17549435 × 10-38 … 3.40282347 × 10+38
Double-precision (double)
Two words: 1 sign bit, 52 bit fraction, 11 bit exponent
Positive range: 2.2250738585072014 × 10-308 … 1.7976931348623157 × 10+308
*
Boolean Data type is used to store logical value.It can have either True or False value.It is a one bit representation0 represents false value1 represents true valueExample: Boolean a;
a=true;
Roman alphabet, punctuation, digits, and other symbols:Can encode within one byte (256 symbols)
In C:
char a_char = ’a’;
char newline_char = ’\n’;
char tab_char = ’\t’;
char backslash_char = ’\\’;
These data types are derived from more than one primitive data type.Examples are:
Arrays
Records
Structure
Union
Arrays are a finite sequence of variables of the same data type These are commonly implemented by the compiler generating array descriptors for each array
here we have
descriptors for
1-D and multi-D
arrays
*
Records are Varied aggregate of data elementsThe elements of a record are known as fields or membersRecords were introduced in COBOLThis data type is used in many languages.In Java, the functionality of records are achieved through the use of classes
Examples:
COBOL (nested structure.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2. Data type A data type refers to the type of data a variable can store. PHP has eight (8) different data types integer numbers floating point numbers strings Booleans arrays objects resources null 2 WWW.USTUDY.IN
3. Integer The integer data type is used to specify a numeric value without a fractional component. you can declare as given belowinteger $variable; $variable =10; 3 WWW.USTUDY.IN
4. Real Number It is also known as a floating number or floating point number. It is not a whole number and has fractions such as 1.22, 2.45, 100.765 etc. Some examples of valid floating point numbers include: 3.14 0.001 -1.234 0.314E2 // 31.4 1.234E-5 // 0.00001234 -3.45E-3 // -0.00345 4 WWW.USTUDY.IN
5. Boolean Boolean values are true or false, also 0 and empty string evaluates to false, and any numeric value rather than zero, or a string that is not empty evaluates to true. you can declare as given belowBoolean $variable; where Boolean denotes the type of the variable. 5 WWW.USTUDY.IN
6. String String values are sequence of characters, included in a single quote or double quotes, for example, $str1 = "This is a string data type variable"; A string literal can be specified in four different ways: single quoted double quoted heredoc syntax nowdoc syntax 6 WWW.USTUDY.IN
7. Single quoted The simplest way to specify a string is to enclose it in single quotes Example: <?php echo 'this is a simple string'; ?> WWW.USTUDY.IN 7
8. Double quoted If the string is enclosed in double-quotes ("), Example: “This is a string”, this will evaluate to: This is a string WWW.USTUDY.IN 8
9. Here Documents The heredoc string structure is a method of including larger strings inside the code. we can use it to include content of any length. To create a heredoc, use a special operator that is made up of three left brackets ( <<< ). The syntax is as follows: $longString = <<< termination_marker any amount of content termination_marker; 9 WWW.USTUDY.IN
10. Nowdoc Nowdocs are to single-quoted strings what heredocs are to double-quoted strings. A nowdoc is specified similarly to a heredoc, but no parsing is done inside a nowdoc. 10 WWW.USTUDY.IN
11. Array An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several different uses; it can be treated as an array, list (vector), hash table (an implementation of a map), dictionary, collection, stack, queue, and probably more. As array values can be other array s, trees and multidimensional array s are also possible. WWW.USTUDY.IN 11
12. Resource Resources are not an actual data type, but the storing of a reference to functions and resources external to PHP. The most common example of using the resource data type is a database call. 12 WWW.USTUDY.IN
13. Null Null is a special data type which can have only one value, which is itself. Which is to say, null is not only a data type, but also a keyword literal. A variable of data type null is a variable that has no value assigned to it. WWW.USTUDY.IN 13