Add text to an image with PHP

Add text to an image with PHP

In this post I would like to show how you can add text to an image with PHP, GD Library....

php-mysql - 4 years ago 1 minute read

How to change array keys from uppercase to lowercase?

How to change array keys from uppercase to lowercase?

The array_change_key_case() function changes all keys in an array to lowercase or uppercase. Syntax: array_change_key_case(array,case); array - The array to...

php - 4 years ago 1 minute read

Convert Comma Separated String into Array

Convert Comma Separated String into Array

<?php $str="foo,bar,baz,bat"; $arr=explode(",",$str); // print_r($arr); ?>

php - 4 years ago 1 minute read

PHP - Convert HEX to RGB

PHP - Convert HEX to RGB

Below function takes hex code (e.g. #eeeeee), returns array of RGB values. function hex2rgb( $colour ) { if ( $colour[0]...

php - 4 years ago 1 minute read

Zero Padded Numbers with php?

Zero Padded Numbers with php?

Today I got a situation where I need automatically zero filled number. I realized it could be done much str_pad....

php-mysql - 4 years ago 1 minute read

PHP - Cache Google Web Fonts using Api

PHP - Cache Google Web Fonts using Api

/** * Get google fonts * * @param integer $amount - Return a chuck of fonts * * @return Array...

php - 5 years ago 1 minute read

How to get  the logo of any company

How to get the logo of any company

In this post I would like to show you getting any company logo with the use of Clearbit's logo API...

php-mysql - 5 years ago 1 minute read

Devicecloud digi - API Authentication Example using PHP

Devicecloud digi - API Authentication Example using PHP

$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://devicecloud.digi.com/ws/v1/devices/inventory'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FLASE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FLASE); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD,...

php - 5 years ago 1 minute read

See if Value Exists in PHP Array

See if Value Exists in PHP Array

in_array() is the function to Check if a value exists in an array using PHP. Here is an example of...

php - 5 years ago 1 minute read

Check if two arrays are equal

Check if two arrays are equal

php - 5 years ago 1 minute read