Outputs a single website comment in the form of an array, a single array

Source: Internet
Author: User

Outputs a single website comment in the form of an array, a single array

In the original library function, the method for displaying a single comment is not obtained. Add the following:

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

Output array, which can be called in the template


Assign values to array a and output the elements in all arrays in the form of five data entries per row.

# Include "stdio. h"
Main ()
{
Int a [20], I; // assume that the array is 20 elements.
For (I = 0; I <20; I ++)
Scanf ("% d", & a [I]); // The array elements are input by the keyboard.
For (I = 0; I <20; I ++)
{
Printf ("% 5d", a [I]);
If (I % 5 = 0)
Printf ("/n"); // if the number is 5, a line break is output.

}
}

How to output an array

I don't know the specific request function, but it's easy to use js.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.