If you want to split every letter then leave first parameter empty.
basename() is an inbuilt function in PHP. It is used to get the name of the file from a path. You can pass the path in its argument as a string and then it will return the name of the file with the extension. Basically, the basename() function splits path and return last data from … Read more basename() function | Get file & folder name from path in PHP
Recursive program to copy a directory***
error_reporting() is an inbuilt function of PHP (hypertext preprocessor) language. It is used to turn off the reporting of errors and warnings. Sometimes, we need to make use of it as not to get unnecessary errors. For example, when you define conditions in if(condition), if that does not produce true, then your else statement will … Read more error_reporting() function: Turn off Error Reporting in PHP
This post is going to help you if you want to update data in a property (variable) of class in object-oriented programming from outside of the class in PHP. See example–
You know that in object-oriented programming, we write all our code statements in a class. So here, you will know that if a class has a function in it then how to call it. The first step is to create an object by class name. And make sure you added a ‘new‘ keyword before. Store … Read more How To Call A method (function) From the Class in PHP Oops
There is function date_parse() in PHP. It splits date and time and returns an associative array. Now, easily We can get the day, month, hours, etc. separately by using the key names. date_parse() function example Print all extracted data by loop as key value pair date_parse() function also returns some arrays. Therefore, you will get … Read more date_parse() function • How To Split Date and Time in PHP
The function timezone_identifiers_list() returns an array that contains all the timezone (almost 426). So you can print them by accessing indexing numbers. Here I am going to print all the timezone with the help of a loop. See example below. Print all the timezone list using foreach() loop calculation to current and custom date & … Read more timezone_identifiers_list() function ~ Print Timezones List in PHP
The strtotime() function returns the current date and time. Besides, returning the current date it also can be used for creating custom date and time. By using this function, we can add or remove days, weeks, years & months or hours, minutes & seconds to custom date and time or current date and time We … Read more strtotime() function: Calculation to Current Date and Time & Custom Date and Time in PHP
Php gives a function for calculating days, months and years on a custom date. The method is date_add(). You can add days or months or years to a date in round figure. Table of Contents || Add days to a date in PHP in round figure|| Add months to a date|| Add years to a … Read more date_add() ~ How To Add Days, Months and Years in a Custom Date in PHP?