How to remove last element of an array in PHP

How to remove last element of an array in PHP, We can remove last element of an array using array_pop function in php. First we are using an array with sample values, then we are assigning it to an $array variable, before applying the function we are printing array with print_r function surrounded with pre […]

Continue reading

How to loop through the POST array in PHP

How to loop through the POST array in PHP, If you have lots of form fields and you want to automate the process of writing long and daunting sql queries, By starting with assigning post array to variables, after that writing long sql query by mapping table row to assigned variables. We can automate this […]

Continue reading

How to separate an array with commas in PHP

Separating an array with commas in PHP, we are separating an array with PHP’s function implode, first we are using an array of sample values and assigning it to an $array variable. then we are passing two arguments to implode function one is separator, what we want to separate the array with, ane the next […]

Continue reading