php char at position in string code example
Example 1: get the string after a character in php
$data = "123_String";
$whatIWant = substr($data, strpos($data, "_") + 1);
echo $whatIWant;
Example 2: 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