We will practise DateTime and Regular Expressions.
Create a simple 'birthday countdown' script, the script will count the number of days between current day and birth day.
Write a PHP script to print the current date in the following format. To get current date's information you can use date()
function.
Print in formats:
- 2013/09/01
- 13.09.01
- 01-09-13
Write a PHP script to get the first and last day of a month from a specified date.
Write a PHP script to display time in a specified timezone.
Write a PHP script to increment date by one month.
Write a PHP script that checks if a string contains another string
Write PHP script which will find all http href values in HTML and replace them to https in all a (link) tags.
<a href="http://www.someaddress.org">Not Secure Url</a>
Will be replaced with:
<a href="https://www.someaddress.org">Not Secure Url</a>
Use same script from task 7
and add some extra juice. Each a tag content append with string 'Link is changed - '.
Also add class modefied
to a tag.
###task 9
Write a PHP script to remove non numeric characters except comma and dot.
Sample string : '$123,34.00A' Expected Output : 12,334.00
Write a PHP script that removes the whitespaces from a string.
Sample string : 'The quick " " brown fox' Expected Output : Thequick""brownfox