↓ Skip to Main Content

TheoryApp

Main Navigation

  • Home
  • Java
Home › Archive for PHP

Category: PHP

Store compressed data in database using PHP

By theoryapp Posted on December 19, 2021 Posted in PHP, SQL Tagged with big data, blob, compression

When storing big text contents in a database, it is better to store after compressing the data. The following is an example storing HTML contents in a database cache. We first create a table mapping URLs to HTML contents. The …

Store compressed data in database using PHP Read more »

Format numbers with leading and trailing zeros in PHP

By theoryapp Posted on December 11, 2021 Posted in PHP

PHP provides str_pad() to add a string to a certain length with another string. Another way is to use sprintf() with formatting patterns. Pad leading zeros to get exactly 3 digits:

Get or Remove the Last Char in Strings in PHP

By theoryapp Posted on May 11, 2021 Posted in PHP Tagged with substr

PHP function substr() allows manipulating a string for the rear. The function is defined as below. It returns the portion of string specified by the start and length parameters. If start is negative, the starting position is counted from the …

Get or Remove the Last Char in Strings in PHP Read more »

Find and Replace Hashtags and Mentions in PHP

By theoryapp Posted on February 28, 2021 Posted in PHP Tagged with hashtag, mention, social network

Social network messages often use hashtags and username mentions to build connections. For example, following message mentions username such as @dummyuser and has hashtags such as #dummytag. The following examples show how to retrieve and replace hashtags and mentions using …

Find and Replace Hashtags and Mentions in PHP Read more »

Posts navigation

1 2 Next

Recent Posts

  • Customize Mediawiki To Remove Management Links
  • Install and Run PHP on MacOS
  • Load Apache Access Logs into MySQL
  • How to Stop Processes Run by “launchd” in Mac
  • Use PHP Imagick to Combine Multiple Images into One Image
  • Remove a Substring Based on Begining and Ending Tags in PHP
  • Trim Leading Zeros of Numbers in a String with PHP
  • How to Create a Table using jsPDF
  • How to Choose a Random Element from an Array
  • How to Print a List of Items in Rows and Columns in jsPDF

Categories

  • Algorithm
  • BigData
  • Combinatorics
  • DevTool
  • HowTo
  • Java
  • JavaScript
  • MySQL
  • PHP
  • Probability
  • SQL
  • Theory
  • Uncategorized
  • Web

Tags

abstract class abstract method ArrayList boolean function chernoff bound class CSS derandomization divide and conquer dom endswith expression FIFO fourier analysis generic type geocoding google maps html inheritance interface java java collection JavaScript lifo loop mysql object-oriented parser PHP polymorphism probability programming pseudorandom generator random random walk recursion regular expression rss seo sql startswith store locator string twitter xml

Archives

  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • July 2023
  • May 2023
  • March 2023
  • May 2022
  • February 2022
  • December 2021
  • August 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • February 2020
  • January 2020
  • December 2019

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 TheoryApp | Powered by Responsive Theme