Press enter to see results or esc to cancel.

Abraham Garcia Abraham Garcia in PHP Scripts   Friday, August 9 2019

Determine if Day is in the Future of Today PHP

Check if Date is in the Future. A Small Snippet to determine if day is bigger than today.

Check if Date is in the Future. A Small Snippet to determine if day is bigger than today. $checkdate = new DateTime($current_store['checkdate']); $current_date = new DateTime(); if ($checkdate > $current_date) { //date is in the future }

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, July 11 2019

Invisible Recaptcha V3 PHP Example

Complete HTML, JS and PHP Sample on How to get Started with Google Recaptcha V3. The New and Improved Recaptcha V3.

This is a short Recaptcha V3 Example on PHP.   Add this on Your Header Before closing </head> <script src="https://www.google.com/recaptcha/api.js?render=siteKeyCode"></script> <script>

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, July 5 2019

Example of PHP Paypal Smart Buttons - How to Integrate Smart PayPal Buttons

A Short tutorial and snippets on how to integrate PHP PayPal Smart Buttons.

This is a snippet code of the integration of PayPal Smart Buttons. I struggled so much in creating this for SandBox so this is the sandbox integration for PayPal Smart Buttons.  First you must include the Script Tag <script

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, June 27 2019

How to Determine the Last and First Iteration of a For Each Loop PHP

A short snippet to determine the first and last iteration in a foreach loop for PHP.

Use this snippet to figure the Last and First iteration of a foreach loop.  $i = 0; $len = count($array); foreach ($array as $item) { if ($i == 0) { // first } else if ($i == $len - 1) { // last } //

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, June 14 2019

How to Add A Class to a Form Submit in CodeIgniter PHP

Want to add a class to the form_submit function in CodeIgniter. I found this and it has helped me modify my buttons on the fly.

Want to add a class to the form_submit function in CodeIgniter. I found this and it has helped me modify my buttons on the fly.  echo form_submit('loginSubmit', 'Login',"class='btn btn-danger'");    

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, May 23 2019

How to Remove index.php on URL in CodeIgniter

Remove the index.php in the URL for CodeIgniter. Simple and Fast Tutorial for all PHP Developers.

Short instructions on how to remove the CodeIgniter index.php with .htaccess 1. Create .htaccess File RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] 2. Update

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, May 17 2019

How to Convert UNIX timestamp to Format Date String

Easy way to convert unix timestamp to nice date format in PHP.

Use this to convert unix timestamp to format php date <?php $timestamp=1333699439; echo gmdate("Y-m-dTH:i:sZ", $timestamp); ?>  

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, May 9 2019

Clean Phone PHP Remove Parentheses and Dashes

A Short Snippet to Clean Phone from Special Characters. Remove Parentheses and Dashes.

This is a short snippet on how to clean a phone number from Dashes and Paranteses. Use this to clean phones on the fly.  $ph_number = '(619) 584-5555'; $phone = preg_replace('/[^dxX]/', '', $ph_number);    

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, February 8 2018

How to Fetch all Channel Youtube Videos with PHP

How to retrieve all youtube videos from a youtube channel. Get the latest and all videos from a youtube channel via php youtube api.

This is a short tutorial snippet on how to fetch via YouTube API's a channels videos. You first have to create an API Key in order to be granted into YouTube API Data.  Getting Started on YouTube

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, January 19 2018

How to Enable Emoji on MySQL with PHP

This is a short tutorial on how to enable Emojis with MySQL and PHP. Simple 5 Steps to get started with Emojis MySQL.

I struggled so much getting iOS and Android Emoji's to work with my Cordova Application. The Server Side of my application is in PHP and Runs a MySQL Database.  After reading and trying i finally figured out the steps to get your Emoji

Continue reading