Get the App
SLTechnology News&Howtos  ›  Development  › 

How to get a single comment from a website and output it as an array

Shulou Source: shulou.com Published: 2022-06-03 08:53:46 11月15日 Update

This article mainly explains "how to output a single website comment in the form of an array". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. let's study and learn "how to output a single website comment in an array"!

In the original library function, there is no method to get the display of a single comment, which is added as follows

Public static function single ($id) {global $db;return $db- > query ("SELECT * FROM `{$db- > prefix} comment`WHERE `id` ='{$id}'", 1);}

Output array, which can be called in the template

Thank you for your reading. the above is the content of "how to output a single website comment in the form of an array". After the study of this article, I believe you have a deeper understanding of how to output a single website comment in the form of an array, and the specific use still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Array comment output form website learning content function that is ideas situations articles methods more templates knowledge knowledge points articles follow questions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology Shulou Information Docker Shulou Tech Info