public function adminid_to_seqno($conn, $adminid) { $sql =<<<EOD
SELECT
*
FROM
t_admin
WHERE
adminid = '{$adminid}';
EOD; $res = pg_query($conn, $sql) or die("データ抽出エラー");
$row = pg_fetch_array($res, 0, PGSQL_ASSOC); return $row['seqno'];
}///////////////////////////////////////////////////////
上面代码中 “=<<<”是什么意思?谢谢。

解决方案 »

  1.   

    字符串,可以用三种方法定义:
    单引号 ( ')
    双引号 (")
    定界符 (“<<<”)
    应该在 <<< 之后提供一个标识符,然后是字符串,然后是同样的标识符结束字符串。
      

  2.   

    <?
    // 字符串中包含变量
    $foo = "foobar";
    $bar = "barbaz";
    print "<br>";print "foo is $foo"; // foo is foobar
    print "<br>";
    //输出一段文字
    $variable="aaaaaaaaaaaa";
    print <<<END
    This uses the "here document" syntax to output
    multiple lines with $variable interpolation. Note
    that the here document terminator must appear on a
    line with just a semicolon no extra whitespace!
    END;
    ?>
    你运行以下这个,我觉得就是一个string