PHP STRING FUNCTIONS - PHP LESSON 6 STUDENTSBLOG100 - Anna University Multiple Choice Questions

PHP STRING FUNCTIONS - PHP LESSON 6 STUDENTSBLOG100


In this Php tutorial 6, we are gonna to study about php basic string functions that a developer must know.

The two main string functions in php are
  • String Length
  • String Position
String Length:
This function is used to find the length of the string.

Syntax:
  • strlen("string") or strlen(stringname)
Example:


Output:
16
5

String Position:
This function is used to find the position of the string.

Syntax:
  • strpos("string","a letter or word to find its position");
Example:


Output:
8
12

Note : Count of string will be start by 0.

Lesson 5 Previous | Main Page | Next Lesson 7

No comments:

Post a Comment