Jump to content
Fórum Script Brasil
  • 0

Array E Strlen



3 answers to this question

Recommended Posts

  • 0

Brother Tu quer ver o tamanho do array ou o tamanho da string que esta no array ?!?!?

strlen ele calcula o tamanho da string.


$nome = "NashY";

echo strlen($nome)

Vai retorna 5

Agora c você quer calcular o tamanho do array ae e' diverente.


$nome[1] = "NashY";

$nome[2] = "NashY2";

$nome[7] = "NashY7";

echo sizeof($nome)

Vai retornar 3

sizeof() ou count() calcula o tamanho do array.

Espero ter ajudado.

Qualquer duvida posta ae.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...