Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私が持っている場合$word = "big words";
$word = "big words";
どうすれば最初の 6 文字だけを保持できるので、次のようになります。
$word = "big wo";
(PHPで)
substr、実際には文字列を持つほとんどすべての言語で機能します。
substr
部分文字列関数が必要です:
substr($word, 0, 6);