A voir également:
- Chaine de caracteres en PHP
- Caractères ascii - Guide
- Chaine tnt gratuite sur mobile - Guide
- Caractères spéciaux clavier azerty - Guide
- Caractères spéciaux - Guide
- Plus de chaine tv - Guide
4 réponses
Essaie avec la fonction substr(chaine,n,m) qui retourne la sous-chaine commençant à la n-ième position et de longueur m ( pour le premier caractère n = 0 ).
print(substr("abcdef",4,1) );
-> e
print(substr("abcdef",4,1) );
-> e
jisisv
Messages postés
3645
Date d'inscription
dimanche 18 mars 2001
Statut
Modérateur
Dernière intervention
15 janvier 2017
934
17 juil. 2002 à 17:19
17 juil. 2002 à 17:19
Plus simplement (pour un caracatère)
johand@zoot:/tmp$ php4
<?
$st="123ab";
echo $st[3];
?>
X-Powered-By: PHP/4.1.2
Content-type: text/html
ajohand@zoot:/tmp$
Gates gave us the windows.
Linux gave us the whole house....
johand@zoot:/tmp$ php4
<?
$st="123ab";
echo $st[3];
?>
X-Powered-By: PHP/4.1.2
Content-type: text/html
ajohand@zoot:/tmp$
Gates gave us the windows.
Linux gave us the whole house....