Você está na página 1de 2

Arrays

Introduo s arrays
Criar Arrays
print_r();
Arrays multidimensionais

Operaes (comparao, contagem, pesquisa e gesto de elementos)


count();
sizeof();
array_search();
array_push();
array_splice();
unset();

Iteraes (ponteiros)
current() - Return the current element in an array
end() - Set the internal pointer of an array to its last element
next() Advance the internal array pointer of an array
prev() - Rewind the internal array pointer
reset() - Set the internal pointer of an array to its first element
each() - Return the current key and value pair from an array and advance the
array cursor
Ciclo for
Ciclo foreach

Ordenao
sort(); - ordena os valores
asort(); - ordena e mantm a relao do valor com o key
rsort(); - ordena de forma decrescente
arsort(); - ordena de forma decrescente
ksort(); - ordena pelo key
shuffle(); - baralha um array

Built in Arrays
sort(); - ordena os valores
$_COOKIE
$_ENV
$_FILES
$_GET
$_POST
$_REQUEST
$_SERVER
$_SESSION
$GLOBALS
Strings
Comparao, pesquisa e substituio de caracteres
strcmp();
strcasecmp();
stristr();
strlen();
substr();
substr_replace();
strpos();
ltrim();
rtrim();;
trim();
explode();
implode();

Formatao
strtoupper();
strtolower();
ucfirst();
ucwords();
printf();
sprintf();
sscanf();

Você também pode gostar