If you require to redirect a user from one web page to another by using PHP, you may use the header function. By definition, the PHP header Continue Reading
PHP
In different situations, you may require making a string completely uppercase or lowercase or camel case letters i.e. capitalize the first letter of each word. PHP provides Continue Reading
In your PHP application, you may be required to write an algo that generates random numbers that can be used for PINs, passwords, or some other purpose. Continue Reading
To get the total number of elements in an array, you may use the PHP count or sizeof functions. For example, this is how you may get Continue Reading
The $_GET in PHP The $_GET is the way to get the values of variables that are passed to the current PHP page via URL parameters. The Continue Reading
Purpose of trim function in PHP The PHP trim function is used to remove spaces or other characters like a tab, new line, a vertical tab, etc. Continue Reading
The str_replace function The str_replace function of PHP is used to replace a string with the replacement string. A simple str_replace example Replacement count demo The str_replace PHP Continue Reading
The strlen function of PHP The strlen function is used to get the length of a string in PHP programs. The function returns bytes unlike the general Continue Reading
What is while loop? The PHP while loop is used to execute a given block of code until the given expression in the while is false. This Continue Reading
What is $_POST in PHP? The $_POST is an associative array of variables. These variables can be passed by using a web form using the post method Continue Reading
The implode function of PHP is used to convert an array into a string. The resultant string may be joined with a specified character like a comma, Continue Reading
The purpose of include and require statements in PHP The include and require PHP statements are used to include the specified files in the calling file/program. For Continue Reading
The for loop in PHP PHP supports different types of loops to iterate through a given block of code. These include for loop, while and do while Continue Reading
Search string in PHP In the last chapter, I explained how you can use the strpos function of PHP to search strings. I used hard-coded values along with Continue Reading
The strpos function of PHP The PHP strpos is a string function which is used to search a substring in a given string. It returns the numeric Continue Reading