PHP MySQL - For every 6 rows insert a div?

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

PHP:

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

//
3条回答
  •  南笙
    南笙 (楼主)
    2020-11-21 00:54

    You can utilize ARGV:

    v=123test
    awk 'BEGIN {print ARGV[1]}' "$v"
    

    Note that if you are going to continue into the body, you will need to adjust ARGC:

    awk 'BEGIN {ARGC--} {print ARGV[2], $0}' file "$v"
    

提交回复
热议问题