info:myphp:substr

PHP substr, extraire une sous-chaîne de caractères

<?
$x="hello world";
echo $x."<p>";
$y=substr($x, 0, 3);
echo "substr(\$x, 0, 3), ",$y;
$z=substr($x, -5, 4);
echo "<br>substr(\$x, -5, 4), ",$z;
?>
  • info/myphp/substr.txt
  • Dernière modification : 2026/03/05 08:52
  • de radeff