1$myString = 'Hello Bob how are you?';
2if (strpos($myString, 'Bob') !== false) {
3 echo "My string contains Bob";
4}
1
2<?php
3$str = 'abcdef';
4echo strlen($str); // 6
5
6$str = ' ab cd ';
7echo strlen($str); // 7
8?>
9
10
1<?php
2$name = 'abcdef';
3echo strlen($str); // 6
4
5$string = ' ab cd ';
6echo strlen($str); // 7
7?>
1<?php
2$str = 'abcdef';
3echo strlen($str); // 6
4
5$str = ' ab cd ';
6echo strlen($str); // 7
7?>
1<?php
2
3$string='YourString';
4
5echo strlen($string); //outputs 10
6
7/***
8how do it will count
9
10Y | o | u | r | S | t | r | i | n | g
11
121 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
13***/
14?>