How to comment in javascript?
Javascript comments explain the code design. They can also be used to prevent the execution of a section of code if necessary. Comments are ignored while the…
What is JAVASCRIPT, How to add JAVASCRIPT ?
JavaScript is object-oriented programming language which is used by several websites for scripting the webpages. It is an interpreted, full-fledged programming language that enables dynamic interactivity on…
what is json_Encode and json_Decode function in PHP?
json_Encode() Function The json_encode() function is an inbuilt function in PHP which is used to convert PHP array into JSON representation, this can return a JSON encoded string on…
How to concatenate string in PHP?
A string is a collection of characters. It offers various types of string operators and these operators have different functionalities such as string concatenation, compare values and…
What is diff. b/w array PUSH and POP? Explain with example?
The array_push() and array_pop() methods in PHP is used to perform insertions as well as deletions from the object. array_push is used to add value in the array(it always add new…
How to get a random value from a PHP array? Explain with example?
In php, we can get a random value from an array with this function “array_rand()”. this is an inbuilt function in php which is used to fetch…
How to remove duplicate values from PHP array? Explain with example?
In php, array_unique() function is used to remove all the duplicate values from an array, if we have two same values then this function will take first…
How to convert JSON string to an array in PHP? Explain with example?
we can convert JSON string to an array with the help of json decode() function. This functon accepts the JSON string as the first parameter and a…
How to create an empty array in PHP? explain with example
You may ask, “How to create an empty array in PHP?” This is common in PHP codes, where you may want to store the values of a…
List of functions available to sort an PHP array? Explain with example?
In PHP, we have six functions for sorting array: sort()= it sort an array in ascending order rsort()= it sort an array in descending order asort()= it…
How to delete an element from an array? Explain with example?
we have soo many methods to delete an element from an array in php but the most common or mostly used methos are- unset() = This function…
How to create an array from PHP string? Explain with example?
we can create an array from php string with the help of str_split( ) function in PHP, str_split() is an inbuilt function in PHP and is used…
How to check a key exist in array? Explain with example?
We can check a key exist or not in an array with the help of array_key_exist() function in PHP. array_key_exists() function checks an array for a specified…
What is the difference between array_merge and array_combine?
array_merge() Function The array_merge() function is used to merge two or more arrays into a single array. This function is used to merge the elements or values…
How to get number of element in an array? explain with example?
We can get total number of elements in an array by using count() and sizeof() functions. Count() Function The count() function is used to get the total number of…