PHP Tutorials

Archive

Category Archives for "PHP"

PHP Array Length using count or sizeof

PHP Array Length can be measured by using either count function or sizeof function in php. both functions will work same, sizeof function is an alias of count function. By using this count function in PHP, you can measure PHP Array Length. Counts all elements in an array, or something in an object and returns […]

Continue reading

Creating user defined php functions

Creating user defined php functions, this is not about built-in PHP functions, this is about creating user defined custom functions. Function is a block of statements that we can reuse them in other places. Function’s will not executed immediately on page load. These functions will be executed after calling them. We can use these functions […]

Continue reading

PHP is not recognized as an internal command

PHP is not recognized as an internal command, if you want to run php command or php scripts through command line you need to follow this article and setup your windows php development environment to execute php scripts through command line interface. Before executing php command through command line interface you need to add php […]

Continue reading

PHP String Replace

PHP String Replace function will be used for replacing all occurrences of a string with in a string. In str_replace, it expects three mandatory arguments first argument is search word, second argument is replace word, third argument is the main string where you want to replace it a term. Fourth argument is not mandatory it’s […]

Continue reading

Get PHP String Length

To Get PHP String Length we can use strlen in PHP, what it can do is it will counts number of characters for give string, word or paragraph. And output will be always an integer because that will be a number. It takes only one argument, that is string or a variable. String Length function […]

Continue reading

PHP md5 hash function

PHP md5 hash function is used to create a hash from given string. And generated has will be 32 characters long, even if the sting is more than that length. This md5 function will takes two arguments but we need to pass only one argument that is string. Then after that it will generates a […]

Continue reading