Skip to content

NestedPHPMentoring/basic-php-course-part-2-latiifabdi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Beginners up course

We will practise DateTime and Regular Expressions.

Date Time Tasks:

Task 1

Create a simple 'birthday countdown' script, the script will count the number of days between current day and birth day.

Task 2

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

Task 3

Write a PHP script to get the first and last day of a month from a specified date.

Task 4

Write a PHP script to display time in a specified timezone.

Task 5

Write a PHP script to increment date by one month.

Regular Expressions

Task 6

Write a PHP script that checks if a string contains another string

Task 7

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>

Task 8

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

Task 10

Write a PHP script that removes the whitespaces from a string.

Sample string : 'The quick " " brown fox' Expected Output : Thequick""brownfox

About

basic-php-course-part-2-latiifabdi created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published