Submit Search
Upload
String functions and operations
•
Download as PPT, PDF
•
0 likes
•
302 views
Mudasir Syed
Follow
String functions and operations , function in php , php
Read less
Read more
Education
Report
Share
Report
Share
1 of 28
Download now
Recommended
String functions and operations
String functions and operations
Mudasir Syed
String functions and operations
String functions and operations
Mudasir Syed
Css presentation lecture 3
Css presentation lecture 3
Mudasir Syed
PHP array 2
PHP array 2
Mudasir Syed
Dreamweaver cs6
Dreamweaver cs6
Mudasir Syed
Dom in javascript
Dom in javascript
Mudasir Syed
Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
Java script lecture 1
Java script lecture 1
Mudasir Syed
Recommended
String functions and operations
String functions and operations
Mudasir Syed
String functions and operations
String functions and operations
Mudasir Syed
Css presentation lecture 3
Css presentation lecture 3
Mudasir Syed
PHP array 2
PHP array 2
Mudasir Syed
Dreamweaver cs6
Dreamweaver cs6
Mudasir Syed
Dom in javascript
Dom in javascript
Mudasir Syed
Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
Java script lecture 1
Java script lecture 1
Mudasir Syed
Javascript 2
Javascript 2
Mudasir Syed
Css presentation lecture 1
Css presentation lecture 1
Mudasir Syed
Javascript lecture 3
Javascript lecture 3
Mudasir Syed
Sessions in php
Sessions in php
Mudasir Syed
Css presentation lecture 4
Css presentation lecture 4
Mudasir Syed
Functions in php
Functions in php
Mudasir Syed
PHP array 1
PHP array 1
Mudasir Syed
Form validation with built in functions
Form validation with built in functions
Mudasir Syed
Form validation server side
Form validation server side
Mudasir Syed
Javascript lecture 4
Javascript lecture 4
Mudasir Syed
loops and branches
loops and branches
Mudasir Syed
Web forms and html lecture Number 3
Web forms and html lecture Number 3
Mudasir Syed
introduction to programmin
introduction to programmin
Mudasir Syed
Form validation client side
Form validation client side
Mudasir Syed
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Mudasir Syed
Reporting using FPDF
Reporting using FPDF
Mudasir Syed
Introduction To PHP
Introduction To PHP
Shweta A
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Amazon Web Services
PHP 5.4 New Features
PHP 5.4 New Features
Haim Michael
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
Ivan Ma
More about PHP
More about PHP
Jonathan Francis Roscoe
Python and the MySQL Document Store
Python and the MySQL Document Store
Jesper Wisborg Krogh
More Related Content
Viewers also liked
Javascript 2
Javascript 2
Mudasir Syed
Css presentation lecture 1
Css presentation lecture 1
Mudasir Syed
Javascript lecture 3
Javascript lecture 3
Mudasir Syed
Sessions in php
Sessions in php
Mudasir Syed
Css presentation lecture 4
Css presentation lecture 4
Mudasir Syed
Functions in php
Functions in php
Mudasir Syed
PHP array 1
PHP array 1
Mudasir Syed
Form validation with built in functions
Form validation with built in functions
Mudasir Syed
Form validation server side
Form validation server side
Mudasir Syed
Javascript lecture 4
Javascript lecture 4
Mudasir Syed
loops and branches
loops and branches
Mudasir Syed
Web forms and html lecture Number 3
Web forms and html lecture Number 3
Mudasir Syed
introduction to programmin
introduction to programmin
Mudasir Syed
Form validation client side
Form validation client side
Mudasir Syed
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Mudasir Syed
Viewers also liked
(15)
Javascript 2
Javascript 2
Css presentation lecture 1
Css presentation lecture 1
Javascript lecture 3
Javascript lecture 3
Sessions in php
Sessions in php
Css presentation lecture 4
Css presentation lecture 4
Functions in php
Functions in php
PHP array 1
PHP array 1
Form validation with built in functions
Form validation with built in functions
Form validation server side
Form validation server side
Javascript lecture 4
Javascript lecture 4
loops and branches
loops and branches
Web forms and html lecture Number 3
Web forms and html lecture Number 3
introduction to programmin
introduction to programmin
Form validation client side
Form validation client side
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Similar to String functions and operations
Reporting using FPDF
Reporting using FPDF
Mudasir Syed
Introduction To PHP
Introduction To PHP
Shweta A
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Amazon Web Services
PHP 5.4 New Features
PHP 5.4 New Features
Haim Michael
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
Ivan Ma
More about PHP
More about PHP
Jonathan Francis Roscoe
Python and the MySQL Document Store
Python and the MySQL Document Store
Jesper Wisborg Krogh
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - Warburton
Codemotion
Switch to Backend 2023
Switch to Backend 2023
Google Developer Students Club NIT Silchar
First Steps in Python Programming
First Steps in Python Programming
Dozie Agbo
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
Mohammed Mushtaq Ahmed
Introduction to php
Introduction to php
Taha Malampatti
PHP Arrays - indexed and associative array.
PHP Arrays - indexed and associative array.
wahidullah mudaser
High-level Programming Languages: Apache Pig and Pig Latin
High-level Programming Languages: Apache Pig and Pig Latin
Pietro Michiardi
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
Oracle Developers
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Amazon Web Services
Php tutorial(w3schools)
Php tutorial(w3schools)
Arjun Shanka
Php tutorialw3schools
Php tutorialw3schools
rasool noorpour
Custom Component development Oracle's Intelligent Bot Platform
Custom Component development Oracle's Intelligent Bot Platform
Leon Smiers
Pa2 session 4
Pa2 session 4
aiclub_slides
Similar to String functions and operations
(20)
Reporting using FPDF
Reporting using FPDF
Introduction To PHP
Introduction To PHP
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
PHP 5.4 New Features
PHP 5.4 New Features
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
More about PHP
More about PHP
Python and the MySQL Document Store
Python and the MySQL Document Store
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - Warburton
Switch to Backend 2023
Switch to Backend 2023
First Steps in Python Programming
First Steps in Python Programming
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
Introduction to php
Introduction to php
PHP Arrays - indexed and associative array.
PHP Arrays - indexed and associative array.
High-level Programming Languages: Apache Pig and Pig Latin
High-level Programming Languages: Apache Pig and Pig Latin
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Build Deep Learning Applications Using Apache MXNet, Featuring Workday (AIM40...
Php tutorial(w3schools)
Php tutorial(w3schools)
Php tutorialw3schools
Php tutorialw3schools
Custom Component development Oracle's Intelligent Bot Platform
Custom Component development Oracle's Intelligent Bot Platform
Pa2 session 4
Pa2 session 4
More from Mudasir Syed
Error reporting in php
Error reporting in php
Mudasir Syed
Cookies in php lecture 2
Cookies in php lecture 2
Mudasir Syed
Cookies in php lecture 1
Cookies in php lecture 1
Mudasir Syed
Ajax
Ajax
Mudasir Syed
Oop in php lecture 2
Oop in php lecture 2
Mudasir Syed
Oop in php lecture 2
Oop in php lecture 2
Mudasir Syed
Filing system in PHP
Filing system in PHP
Mudasir Syed
Time manipulation lecture 2
Time manipulation lecture 2
Mudasir Syed
Time manipulation lecture 1
Time manipulation lecture 1
Mudasir Syed
Php Mysql
Php Mysql
Mudasir Syed
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Mudasir Syed
Sql select
Sql select
Mudasir Syed
PHP mysql Sql
PHP mysql Sql
Mudasir Syed
PHP mysql Mysql joins
PHP mysql Mysql joins
Mudasir Syed
PHP mysql Introduction database
PHP mysql Introduction database
Mudasir Syed
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
Mudasir Syed
PHP mysql Er diagram
PHP mysql Er diagram
Mudasir Syed
PHP mysql Database normalizatin
PHP mysql Database normalizatin
Mudasir Syed
PHP mysql Aggregate functions
PHP mysql Aggregate functions
Mudasir Syed
More from Mudasir Syed
(19)
Error reporting in php
Error reporting in php
Cookies in php lecture 2
Cookies in php lecture 2
Cookies in php lecture 1
Cookies in php lecture 1
Ajax
Ajax
Oop in php lecture 2
Oop in php lecture 2
Oop in php lecture 2
Oop in php lecture 2
Filing system in PHP
Filing system in PHP
Time manipulation lecture 2
Time manipulation lecture 2
Time manipulation lecture 1
Time manipulation lecture 1
Php Mysql
Php Mysql
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Sql select
Sql select
PHP mysql Sql
PHP mysql Sql
PHP mysql Mysql joins
PHP mysql Mysql joins
PHP mysql Introduction database
PHP mysql Introduction database
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
PHP mysql Er diagram
PHP mysql Er diagram
PHP mysql Database normalizatin
PHP mysql Database normalizatin
PHP mysql Aggregate functions
PHP mysql Aggregate functions
Recently uploaded
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
Maestría en Comunicación Digital Interactiva - UNR
MENTAL STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
PoojaSen20
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
iammrhaywood
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Sarwono Sutikno, Dr.Eng.,CISA,CISSP,CISM,CSX-F
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
NirmalaLoungPoorunde1
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
Sayali Powar
mini mental status format.docx
mini mental status format.docx
PoojaSen20
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
manuelaromero2013
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
UnboundStockton
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
UmakantAnnand
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Celine George
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
Chameera Dedduwage
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
JhengPantaleon
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
InMediaRes1
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
David Douglas School District
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Celine George
Recently uploaded
(20)
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
MENTAL STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
mini mental status format.docx
mini mental status format.docx
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
String functions and operations
1.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Hidaya Institute of Science & Technology www.histpk.org A Division of Hidaya Trust, Pakistan
2.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org String Functions and Operations
3.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org What Is String? A string is a data type used in programming, such as an integer and floating point unit, but is used to represent text rather than numbers. It is comprised of a set of characters that can also contain spaces and numbers. For example, the word "hamburger" and the phrase "I ate 3 hamburgers" are both strings. Even "12345" could be considered a string, if specified correctly. Typically, programmers must enclose strings in quotation marks for the data to recognized as a string and not a number or variable name. •String is a collection of characters. •String is a collection of ASCII characters. •http://www.asciitable.com/
4.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP chr() Function The chr() function returns a character from the specified ASCII value. Syntax chr(ascii) Example <?php echo chr(65); echo chr(122); ?>
5.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP ord() Function The ord() function returns the ASCII value of the first character of a string. Syntax ord(string) Example <?php echo ord(“h”).”<br />”; echo ord(“hello”).”<br />”; ?>
6.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP strlen() Function The strlen() function is used to return the length of a string. Syntax strlen(string) Example <?php echo strlen("Hello world!"); ?>
7.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP substr() Function The substr() function returns a part of a string. Syntax substr(string,start,length) Example <?php echo substr("Hello world!",6); echo substr("Hello world!",6,5); ?>
8.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP trim() Function The trim() function removes whitespaces from both sides of a string. Syntax trim(string) Example <?php echo trim(“ Hello World ”); ?>
9.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 1 Enter String Text Click Output
10.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 2 Enter String Text Click Output
11.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 3 Enter String Text Click Output
12.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 4 Enter some text here Find character Replace character Click Output
13.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 5 Enter Text Click
14.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 5 Output
15.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 6 Characte r Output Click
16.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 6 Characte r Output Click
17.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 7 Enter Text Click Output
18.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP rand() Function The rand() function generates a random integer. If this function is called without parameters, it returns a random integer between 0 and RAND_MAX. If you want a random number between 10 and 100 (inclusive), use rand (10,100). Note: On some platforms (such as Windows) RAND_MAX is only 32768. So, if you require a range larger than 32768, you can specify min and max, or use the mt_rand() function instead. The other random function, mt_rand() function generates a better random value than this function .
19.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org • PHP rand() Function continue…… • Syntax rand(min,max) Example 1 <?php echo(rand() . "<br />"); echo(getrandmax(). "<br />"); echo(rand(10,100)); ?>
20.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org • PHP rand() Function continue…… • Example 2 <?php echo "<hr> mt_rand = ".mt_rand()."<hr>"; echo "<hr>rand = ".rand()."<hr>"; echo "<hr> mt_rand with range = ".mt_rand(1,100)."<hr>"; echo "<hr> rand with range = ".rand(1,100)."<hr>"; ?>
21.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org • PHP round() function • The round() function rounds a number to the nearest integer. • Syntax: • round(x,prec) Parameter Description x Required. The number to be round prec Optional. The number of digits after the decimal point
22.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org • PHP round() function continued…. • Example 1 • <?php • echo round(1.68) ; • ?> • Example 2 • <?php • echo round(1.68,1) ; • ?>
23.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org • PHP ceil() function • The ceil() function returns the value of a number rounded UPWARDS to the nearest integer. Syntax Ceil(x) Example: <?php echo ceil(0.60); ?>
24.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org • PHP floor() Function • The floor() function returns the value of a number rounded DOWNWARDS to the nearest integer. Syntax floor(x) Example: <?php echo floor(0.60); ?>
25.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP explode() Function The explode() function breaks a string into an array. Syntax explode(separator,string) Example <?php $string = "Hello world. It's a beautiful day."; print_r (explode(" ",$string)); ?>
26.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org PHP implode() Function The implode() function returns a string from the elements of an array. Syntax implode(separator,array) Example <?php $array = array('Hello','World!','Beautiful','Day!'); echo implode(" ",$array); ?>
27.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 8 Disabled Textbox Click Generate Password Output
28.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Assignment # 9 Enter Word Click Output
Download now