Recently I was working with some PHP project and I had to fetch some text from database but I did not want to show all the paragraph. Instead I wanted to display just some part of it and give the reader facility to have a link or read more. For example: If the original text […]
function_exists — Return TRUE if the given function has been defined. To check that whether a function is defined or exists or not use function_exists. Checks the list of defined functions, both built-in (internal) and user-defined, for function_name. Returns TRUE on success or FALSE on failure.
The PHP function implode operates on an array and is known as the “undo” function of explode. If you have used explode to break up a string into pieces or parts or just have an array of stuff you can use implode to put them all into one string.
The PHP function explode lets you take a string and blow it up into smaller pieces. For example, if you had a sentence you could ask explode to use the sentence’s spaces ” ” as dynamite and it would blow up the sentence into separate words, which would be stored in an array. The sentence […]
A function is just a name we give to a block of code that can be executed whenever we need it. This might not seem like that big of an idea, but believe me, when you understand and use functions you will be able to save a ton of time and write code that is […]