PHP 中输出变量类型的数据
答案:gettype()
gettype() 函数用于确定变量的数据类型。它返回一个字符串,其中包含变量类型的名称。
使用示例:
<code class="php">$name = "John Doe"; echo gettype($name); // 输出:string</code>
PHP 中输出变量类型的数据
答案:gettype()
gettype() 函数用于确定变量的数据类型。它返回一个字符串,其中包含变量类型的名称。
使用示例:
<code class="php">$name = "John Doe"; echo gettype($name); // 输出:string</code>
之前