ChartJS | How to draw Bar chart from server data using MySQL, Ajax and PHP
Chart.JS | Draw Bar chart from server data using MySQL, Ajax, and PHP This example shows how to draw a bar chart with data from the database server. FILE STRUCTURE At the end of this …
ChartJS change graph type based on Dropdown selection
Chart.js | Changing graph type based on dropdown selection We can’t directly update the chart type in Chart.js, to achieve the requirement we need to destroy the original chart and then redraw the new chart. …
How to show data values on top of each bar in chart.js
Chart.js | show data values on top of each bar This is an example of displaying data value on top of each bar of Chart.js on the web page. Step 1: Create a basic HTML …
Add bar chart in web page
Chart.js | Add bar chart in the webpage This is a simple example of using Chart.js to create a bar chart on the webpage. Step 1: Create a basic HTML file called "chart.html" <!DOCTYPE html> …
How to refresh a page with jquery?
Jquery | Location reload() Method | Refresh a page The Location.reload() method reloads the current URL. Syntax location.reload(forceGet) The Location.reload() method reloads the current URL. By default, the value of forceGet is false which …
How to get html attribute's value in jquery?
Jquery | attr | Get HTML attribute's value You can get the value of an attribute for the first element in the set of matched elements using the .attr() function. Return the value of …
Clear the TINYMCE editor's content using jquery.
JQuery | TinyMCE | Clear TINYMCE editor There is a method called setContent() in TINTMCE which you can use to reset/clear the TINTMCE editor. <script> // if one editor existing in your page. tinyMCE.activeEditor.setContent(''); </script> …
Uncaught TypeError: e.indexOf is not a function in JQuery
JQuery | Uncaught TypeError: e.indexOf is not a function This error occurs because you may try to load an event handler which is removed from the latest version of jQuery. Event handler like .load(), .error(), …
CodeIgniter where_in condition
Codeigniter | where_in The where_in() allows you to pass an array in the where clause. It generates a WHERE field IN ('item', 'item') SQL query. Syntax: $this->db->where('condition'); <?php $ids = array('1', '2', '3'); $this->db->from('users'); $this->db->where_in('id', …
A non-numeric value encountered in PHP
PHP | Warning: A non-numeric value encountered This error occurs when you are trying to do a mathematical operation on an integer with a nun-numeric value or a string. Info: New E_WARNING and E_NOTICE errors …
Comments in PHP
PHP | Comments A comment in PHP code is a line that is not executed as a part of the program. It's only read by someone who is looking at the code. By reading the comments …
Is PHP a case sensitive language?
PHP | Case Sensitive In PHP, keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are not case-sensitive but all variable names are case-sensitive. If you defined function name in lowercase, …
PHP Syntax and Tags
PHP | Syntax, and Tags PHP introduces a list of Tags to code PHP. PHP tags allow the PHP parsing engine to get in and get out from the PHP block. A PHP script can …
What will be the value of $x when given statement execute?
PHP | Statement $x = 3 + "15%" + "$25"? The correct answer is 18. Here’s why: PHP is a loosely typed language, therefore it does automatic type conversion based on the context in which …
What are the errors in below code? What will be output and how can you fix it?
PHP | Array error fix | array_merge() The output will be as follows: array(2) { [0]=> int(1) [1]=> int(2) } NULL NULL It will also generate two warning messages as follows: Warning: array_merge(): Argument #2 …