Monday, October 17, 2016

How to delete one array element from array

i) unset() method


$Array = array("test1","test2","test3","test3");

unset($Array[2]);

ii) array_diff_key() method


$Array = array("test1","test2","test3","test3");

array_pop($Array);

iii) array_splice() method


$Array = array("test1","test2","test3","test3");

array_splice($Array,1,2);

iv) array_diff() method


$Array = array("test1","test2","test3","test3");

array_shift($Array);

Related Posts:

  • System Requirements OpenCart 2.3.0.2 System / Server requirements OpenCart requires certain technical requirements to be met for the store to operate properly. First, a web server must… Read More
  • vQmod Scripts and Syntax Scripting The Golden Rules First things to set in your mind... The <search> tag can only be a single line, though doesn't ha… Read More
  • How to cancel credit in opencart Suppose it may happen, customer purchase something from your website but after successful transaction, you come to know that particular product is no… Read More
  • About vQmod What is vQmod? vQmod™ (aka virtual Quick mod) gives the ability to create modification "scripts" that override the code during execution time. It i… Read More
  • Why We Love OpenCart 1. OpenCart is Free 2. Open-Source, Customizable and Flexible 3. Responsive Design 4. Free and Paid Functionality Extensions 5. SEO Ready 6. … Read More

0 comments :

Post a Comment