Jump to content
Fórum Script Brasil
  • 0

Array E Strlen


Fel_Ripper
 Share

Question

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.

tipo

$nome = "NashY";

echo strlen($nome)

Vai retorna 5

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

tipo

$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.

Abracos.

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.

Guest
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.

 Share



  • Forum Statistics

    • Total Topics
      150.8k
    • Total Posts
      648.5k
×
×
  • Create New...