Re: Type of a variable in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/3/15 Kevin Peterson <qh.resu01@xxxxxxxxx>

> Have two questions -
> 1. How to find type of a variable in PHP.
>

gettype(), or one of the is_*()-functions. But for me more interesting for
me: Why do you _need_ this?


> 2. How to find the type of an array in PHP.
>

An array is of type array :) is_array() or again gettype().


Can you maybe describe what you want to achieve? In a dynamically typed
language it is rarely _required_, that you know the _concrete_ type.


>
> Please help.
>
>


-- 
github.com/KingCrunch

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux