PHP MySQL - For every 6 rows insert a div?

后端 未结 3 871
忘了有多久
忘了有多久 2021-01-29 12:28

PHP:

prepare(\"SELECT * FROM `users`\");
$stmt->execute();
$result = $stmt->get_result();

//
3条回答
  •  -上瘾入骨i
    2020-11-21 01:13

    You could pass in the command-line option -v with a variable name (v) and a value (=) of the environment variable ("${v}"):

    % awk -vv="${v}" 'BEGIN { print v }'
    123test
    

    Or to make it clearer (with far fewer vs):

    % environment_variable=123test
    % awk -vawk_variable="${environment_variable}" 'BEGIN { print awk_variable }'
    123test
    

提交回复
热议问题