• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

Tag: array

30 October 2020

How to Check If a Value Exists in An Array in PHP

Written by Rahul
Q. How do I check if a specific value exists in an array in PHP. Write a sample PHP program to check if a value exists in an array. Using PHP in_array() function Use PHP in_array() function to check whether a specific value exists in an array or not. Here is an sample PHP...
Read More about How to Check If a Value Exists in An Array in PHP
27 October 2020

How To Remove Specific Array Element in PHP

Written by Rahul
Q. How do I remove a specific element from an array using PHP. In this tutorial, you will learn two PHP unset() and array_splice() methods to remove specific array elements. Using PHP unset() Function Use the PHP unset() function to delete an element from an array. Basically it is used to unset any variable...
Read More about How To Remove Specific Array Element in PHP
27 October 2020

Remove Duplicate Array Values in JavaScript

Written by Rahul
An array is a data structure that contains a group of elements. Typically these elements are all of the same data type, such as an integer or string but in case of JavaScript, we can store different type of elements. Using arrays you can organize data so that a related set of values can...
Read More about Remove Duplicate Array Values in JavaScript
14 October 2020

How to Remove Duplicate Array Values in PHP

Written by Rahul
A Sample PHP script to remove all the duplicate values from an array. A running example to remove duplicate array values using PHP Use PHP array_unique() function to remove all the duplicate values form an array. This function takes input of an array and return another array without duplicate values. Here is an sample...
Read More about How to Remove Duplicate Array Values in PHP
24 April 2019

How to Empty an Array in JavaScript

Written by Rahul
An array is a container of multiple values of similar types. After initializing an array, how can you empty it? This tutorial will help you to empty an Array in JavaScript language. Empty Array in JavaScript Use the following syntax to empty an Array. Here myArray is the name of Array. myArray = ;...
Read More about How to Empty an Array in JavaScript
27 September 2018

How to Create and Use Array in Bash Script

Written by Rahul
An array is a data structure consist multiple elements based on key pair basis. Each array element is accessible via a key index number. This tutorial will help you to create an Array in bash script. Also, initialize an array, add an element, update element and delete an element in the bash script. Define...
Read More about How to Create and Use Array in Bash Script
22 July 2018

How to Append an Item to Array in JavaScript

Written by Rahul
Question – How to Append an Item to Array in JavaScript. How do I append any element to end of the existing Array in JavaScript? How to push element to array in JavaScript? This tutorial uses javascript push() function to insert or append a new element to end of the Array. JavaScript – Append...
Read More about How to Append an Item to Array in JavaScript
23 March 2017

How to Use JavaScript forEach() Method

Written by Rahul
The JavaScript forEach() method run once for each element in an array. For example to navigate to array and perform any action on each array element. The JavaScript forEach() method is useful in this situation. JavaScript forEach() method uses following syntax: arrayName.forEach(function callback(currentValue, index, array) { // action on array element // action on...
Read More about How to Use JavaScript forEach() Method
17 March 2017

How to Append Element to Array in JavaScript

Written by Rahul
The push() method is used to add elements in JavaScript array. This tutorial will help you to initialize an array in JavaScript. After that append some more elements in Array using push() method in JavaScript. Append Element to Array in JavaScript First, create an array in JavaScript. For example, we are creating an array...
Read More about How to Append Element to Array in JavaScript
06 November 2015

How to Remove Array Element by Value in JavaScript

Written by Rahul
The best way to remove an element from an array based on the value in JavaScript is to find index number of that value in an array using indexOf() function and then delete particular index value using the splice() function. For example use following code. Sample JavaScript Code <script type="text/JavaScript"> var arr = [5,...
Read More about How to Remove Array Element by Value in JavaScript
1 2 Next →

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy