PHP Code Snippets

David Carr

Converts a human readable file size value to a number of bytes that it represents. Supports the following modifiers: K, M, G and T. Invalid input is returned unchanged.

Read more

David Carr

Create a human friendly measure of the size provided.

Read more

David Carr

This function accepts a file extension as it's param it then examines and places it in the correct group (Image, Document, Application, Video, Audio, Database/Spreadsheet, other)

Read more

David Carr

This function returns an array of dates between 2 dates.

Read more

David Carr

Pass this function 2 dates it will return the total number of weekdays between the 2 days, pass true as a third param to return the number of weekend days

Read more

David Carr

using DateTime to get the difference between 2 dates the first and second params are dates then last param is optional

Read more

David Carr

list files within a folder

Read more

David Carr

Using the IN clause to search again multiple id's for instance to return records with an id of 4, 9 and 23

Read more

Copyright © 2011 - 2017 created by David Carr Web Developer. All code MIT license. All rights reserved. Built using Simple MVC Framework