Removing non-integer entries from array in php Here we are going to discuss how to remove strings or non-integer values from an array in php. For this we need to use one simple array function in php called array_filter() . it always filters an array using a callback function. Syntax : Parameters : array :- […]
Automatic serial number in HTML table – CSS Counter
Here we will discuss how to get serial number automatically in a column in the html table. CSS counters are “variables” maintained by CSS whose values can be incremented by CSS rules (to track how many times they are used). Counters let you adjust the appearance of content based on its placement in the document. […]
Reverse String – Qawall
Write a program to reverse string in php We can reverse string in php using the php string function strrev() and without using the string function. Let’s check one by one. Example : string = HELLO WORLD , reverse = DLROW OLLEH Program 1 : using strrev() Click to know more about strrev() Output : […]
Extract values from JSON data using json_value() Sql – single query
How to extract values from json field using JSON_VALUE() in SQL We can extract a scalar value from json string in sql SELECT query. Syntax : JSON_VALUE ( expression ,[Path Mode] JSON_path ) Expression: This is the table field/column name or a variable that contains json values. It should be a valid expression, and else […]
Palindrome Number In PHP – simple and easy method
Write a program to find the number is Palindrome number in PHP A number is called Palindrome when its reverse is same as the orginal number. Eg:- Number = 12321, Reverse = 12321 Both the number and reverse is same thus its called as a palindrome number. Let’s check how to program palindrome number in […]
Fibonacci Series
Write a program to find the fibonacci series in php. In Fibonacci series each number is the sum of the preceding ones. Eg:- 0 1 1 2 3 5 8 13 121start with 0 and 1, then0+1 = 1, 1+1 = 2, 1+2 = 3, so on Program : Define $num = 0, $num1 = […]
Number Reverse in PHP
Write a program for number reverse in php. Here we will discuss how to do the number reverse in php without using any string functions. Reverse number in php is a most commonly asked program and also a basic program. Eg:- Number = 96467, Reverse = 76469 Program : Define a number which you want […]
Armstrong Number
Write a php program to find the number is an Armstrong Number or not If the sum of the cubes of the digits of a number is equal to the number then its called an Armstrong number . Eg:- 153 (1*1*1)+(5*5*5)+(3*3*3) = 1+125+27 = 153 Program : Define a number which you want to find […]
Factorial in PHP Simple Program1
Write a program to find the factorial in php of a number. Factorial of a number is the product of numbers from 1 to ‘n’. Eg:- 5! = 1*2*3*4*5 = 120 PHP :- Declare the number to $n Set $product as 1 In a for loop, loop through 1 to $n Inside the for loop, […]
jQuery Toggle() Method
How to do jquery Toggle() method to show/hide onclick The jQuery toggle() method is used to toggle between the hide() and show() method. It shows the hidden elements and hides the shown element. HTML : Specify a button with an id along with a div containg the text. Also specify an id for the div. […]