Answers for "php character number"

PHP
1

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
Posted by: Guest on May-13-2020
0

how to echo only certain character number in php

$temp = substr($temp, 0, 5);
echo "$temp...";
Posted by: Guest on October-15-2021

Code answers related to "php character number"

Browse Popular Code Answers by Language