Ajax Tag Remove - warwickfoster/qurantools GitHub Wiki

File: app/selection_analyse.php

Purpose

The provided PHP code snippet is a PHP script that generates a table displaying root statistics for a given range of verses.

Key Features

  • Displays a table with root information, including the root word, number of occurrences, percentage of occurrences in the range, and hapax or unique status.
  • Provides links to examine roots, view charts of root occurrences, and access additional information.
  • Includes hapax and unique count statistics.

Code Breakdown

  • Header Includes necessary PHP header files and defines the HTML document type.
  • Body
    • Table Generation
      • Loops through a database recordset containing root statistics.
      • Displays table rows with root information, including number of occurrences, percentages, and hapax/unique status.
    • Charts
      • Creates divs for displaying charts.
      • Provides JavaScript code to render the charts based on the root statistics.
  • Footer Includes the footer section of the website.

Usage

This script is intended to be used in conjunction with a database containing root statistics. The $_GET variable $_GET["V"] should be set to the range of verses for which root statistics are to be displayed.

Output

The script generates an HTML table with the following information:

  • Root Word
  • Number of Occurrences
  • Percentage of Occurrences in the Range
  • Hapax or Unique Status
  • Links to Examine Root, View Charts, and Access Additional Information

Additional Notes

  • The script includes JavaScript code for generating charts.
  • The $capped variable is used to determine whether the chart should display a message indicating that only a limited number of items are being displayed due to limitations.
  • The $MAX_ITEMS_FOR_CHART constant defines the maximum number of items to be displayed in the chart.