Geekpedia
  • Tech
    • Tutorials
      • ActionScript
      • AI Coding
      • ASP
      • ASP.NET
      • C
      • CSS
      • C#
      • C++
      • Code
      • General
      • HTML
      • Java
      • JavaScript
      • PHP
      • Silverlight
      • SQL
      • Visual Basic
    • Software
      • Communications
      • Development
      • Internet
      • Linux
      • Microsoft
      • Security
      • Windows
  • Gear
  • Mobillity
  • Wellness
  • Knowledge Base
  • Media
    • Pictures
  • News
      • ActionScript
      • AI Coding
      • ASP
      • ASP.NET
      • C
      • CSS
      • C#
      • C++
      • Code
      • General
      • HTML
      • Java
      • JavaScript
      • PHP
      • Silverlight
      • SQL
      • Visual Basic
      • Communications
      • Development
      • Internet
      • Linux
      • Microsoft
      • Security
      • Windows
  • Gear
  • Mobillity
  • Wellness
  • Knowledge Base
    • Pictures
  • News
List the content of a directory/folder using PHP
Code PHP
November 7, 2023November 8, 2023Nathan

List the content of a directory/folder using PHP

With a few lines of code and a while loop you can list the content of a directory on both Unix and Windows machines.

Discover
Calculate the age in years using PHP
Code PHP
November 7, 2023November 8, 2023Nathan

Calculate the age in years using PHP

A PHP CalculateAge() function created by applying the logic we used previously in C# to calculate the age from a given birth date.

Discover
Write a string to a file
Code PHP
November 7, 2023November 8, 2023Nathan

Write a string to a file

This example shows you how to write a string to a file using PHP, and also do some error handling to ensure that your file gets written correctly.

Discover
Check if a string ends with another string
Code PHP
November 7, 2023November 8, 2023Nathan

Check if a string ends with another string

A short function that checks whether a passed string ends with another passed string, and returns the answer as a boolean value.

Discover
Redirect using PHP
Code PHP
November 7, 2023November 8, 2023Nathan

Redirect using PHP

A function that redirects the user to the specified URL by sending the appropriate headers or by using JavaScript if the headers were already sent.

Discover
Read content of file or URL into a string
Code PHP
November 7, 2023November 8, 2023Nathan

Read content of file or URL into a string

Two examples on how to read the content coming from an URL or from a local file into a string, using PHP.

Discover
Code PHP
November 7, 2023Nathan

Parsing a Tab Delimited File

This example code shows you how to parse a tab delimited file (or any other character delimited file for that matter), using PHP.

Discover
Code PHP
November 7, 2023November 7, 2023Nathan

Get the modified date and time of a file using PHP

An example on how to use the filemtime() function to retrieve the last update date and time of a file.

Discover
Code PHP
November 7, 2023Nathan

Array of Street Types and their Abbreviations

A PHP array containing the street types / designations and their canonical form / abbreviation, following the USPS standard.

Discover
Code PHP
November 7, 2023Nathan

Array of States and their Territory Code

A PHP array of US state abbreviations and their corresponding territory code, including the leading zero.

Discover

Posts pagination

Previous 1 2 3 4 … 8 Next

Trending Posts

Why Pulsetto’s Vagus Nerve Stimulation Device Is a Must-Have for Stress Relief

Apr 21, 202510 min read
Read More

What’s Included in a Protyre Vehicle Check?

Apr 20, 20259 min read
Read More

The Smart Way to Find a Phone Case That Works for You

Apr 20, 20259 min read
Read More

Why the One World Observatory Should Be Your Next Tech-Themed Adventure in NYC

Apr 20, 202510 min read
Read More

Energy, Focus, Immunity: How Vitabiotics Covers All Bases

Apr 18, 20258 min read
Read More
No Post Found

Trending News

Presenting Apple Vision Pro: Apple’s Premier Spatial Computing Device

Jan 3, 202411 min read
Read More

The Environmental Impact of Computing: A Call for Sustainable Tech

Jan 2, 20247 min read
Read More

Coding Community Highlights 2023

Jan 2, 20245 min read
Read More
Image Not Found
Geekpedia is a knowledge-driven website offering fresh takes on tech, wellness, gear, and more — all through a thoughtful lens.
From coding tips to curated lifestyle content, it’s built for those who live smart, think sharp, and stay curious.
FOLLOW US
  • Social Image
  • Social Image
  • Social Image
  • Code
  • Gear
  • Generative AI
  • Knowledge Base
  • News
  • Contact Us
  • Work With Us
  • About Us
  • Affiliate Disclosure
  • FAQ
  • Advertisement
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions