downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

strnatcasecmp> <stristr
Last updated: Fri, 06 Nov 2009

view this page in

strlen

(PHP 4, PHP 5)

strlen文字列の長さを得る

説明

int strlen ( string $string )

与えられた string の長さを返します。

パラメータ

string

長さを調べる文字列。

返り値

成功した場合に string の長さ、 string が空の文字列だった場合に 0 を返します。

例1 strlen() の例

<?php
$str 
'abcdef';
echo 
strlen($str); // 6

$str ' ab cd ';
echo 
strlen($str); // 7
?>

参考

  • count() - 変数に含まれるすべての要素、 あるいはオブジェクトに含まれるプロパティの数を数える
  • mb_strlen() - 文字列の長さを得る



add a note add a note User Contributed Notes
strlen
There are no user contributed notes for this page.

strnatcasecmp> <stristr
Last updated: Fri, 06 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites