count elements of a string php
<?php
$str = 'abcdef';
echo strlen($str); // 6
$str = ' ab cd ';
echo strlen($str); // 7
?>
$name = "Perú"; // With accent mark
echo strlen($name); // Display 5, because "ú" require 2 bytes.
$name = "Peru"; // Without accent mark
echo strlen($name); // Display 4
Also in PHP:
- application of laravel
- array_values() in php
- SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 byt
- blade loop last
- CURL PHP POST
- How to Get Radio Button Value in PHP Without Submit
- disable register route laravel
- echo redirect set header
- check length text pph
- Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
- array_push in php
- check if key exists in the array
- auth::route disable register
- clear array php
- Delete Query with Where Condition in Codeigniter
- date("U")
- clear laravel webapp cache
- base64 decode
- Format a local time/date php
- Override the route parameter names
- find array key value by check key
- a non well formed numeric value encountered
- check to see in string contains a specifc word php
- \r in php