Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get number of chars ina string php

$name = "Perú"; // With accent mark
echo strlen($name); // Display 5, because "ú" require 2 bytes.

$name = "Peru"; // Without accent mark
echo strlen($name); // Display 4
 
PREVIOUS NEXT
Tagged: #number #chars #ina #string #php
ADD COMMENT
Topic
Name
7+9 =