Showing posts with tag PHP

How to calculate keyword frequency and draw the bar chart in PHP

This post shows you how to calculate the keyword frequency from text and draw the bar chart by using the JpGraph library.

How to count words in a string in PHP

Show you how to count words and extract words from a string by using the PHP function str_word_count()

Create an object from a string variable in PHP

In PHP, objects can be created from string variables. It provides a very convenient way for you to define rules in text and handle requests dynamically. In this post, we show you how to do it.

Reverse an array in PHP by using recursion

Let's go back to a computer science textbook topic. Show you how to reverse an array in PHP without using any native array functions such as array_xxx().

PHP functions strcspn() and strspn()

It's convenient to use the PHP functions strcspn() and strspn() to find out the masking characters and filter a string

Write your own filters and functions in Twig

Create your own custom filters and functions that can be used in Twig templates

String concatenation and interpolation in Twig

Two useful operations in Twig for string concatenation and interpolation

Render a DateTime object in Twig

Use the date filter to render DateTime instances in Twig

Setup Twig for the web project in WampServer on Windows

Setup Twig in WampServer on Windows

A basic pagination function for a blog system

Use the PHP array_slice function to get the subset of data

PHP array_filter function

Filter an array by using a callback function in PHP

Create an array and access array elements in PHP

Create indexed arrays and associative arrays in PHP

Make Ajax requests from the Web API XMLHttpRequest

How to make Ajax requests from the Web API XMLHttpRequest

Make Ajax requests from jQuery

How to create ajax requests from jQuery

Creating a keyword list from text in PHP

This tutorial shows you how to extract a keyword list from a text in PHP

Converting between Line Breaks and HTML <br>

This tutorial shows you how to make the convertion between a line break and a HTML br tag in PHP

Using the Explode Function to Get Data from a String in PHP

This tutorial shows you how to extract data from a string in PHP

Printing out a Matrix by Using the Implode Function in PHP

This tutorial shows you how to print out a matrix in PHP

Finding the Middle Point of a Line Segment

This tutorial shows you how to get the middle point of a line segment in PHP

A Simple 3D Vector Class in PHP

This tutorial shows you the source code of a simple 3D vector class in PHP


Search