CRUD = Create, Read, Update, Delete
$host = '127.0.0.1';
$dbname = 'test';
$username = 'root';| https://www.youtube.com/watch?v=Q5QkgK3xcDo | |
| <?php | |
| /** | |
| * @package WPCamp 2019 | |
| * @version 1.0 | |
| */ | |
| /* | |
| Plugin Name: rewrite api custom permalink - BUILD | |
| Description: Creates custom post type and custom permalink | |
| Author: Sergio |
| // Function to handle the thumbnail request | |
| function get_the_post_thumbnail_src($img) | |
| { | |
| return (preg_match('~\bsrc="([^"]++)"~', $img, $matches)) ? $matches[1] : ''; | |
| } | |
| function wpvkp_social_buttons($content) { | |
| global $post; | |
| if(is_singular() || is_home()){ | |
| // Get current page URL |
| // Function to handle the thumbnail request | |
| function get_the_post_thumbnail_src($img) | |
| { | |
| return (preg_match('~\bsrc="([^"]++)"~', $img, $matches)) ? $matches[1] : ''; | |
| } | |
| function wpvkp_social_buttons($content) { | |
| global $post; | |
| if(is_singular() || is_home()){ | |
| // Get current page URL |
| https://github.com/azeemhassni/simplest-php-router | |
| https://github.com/arvindsvt/PHP-Custom-MVC | |
| <?php namespace EasyRouter { | |
| /** | |
| * A simple, Object Oriented, yet effective REST capable PHP micro router. Can | |
| * easily be used as a `stand-alone` Router or implemented with composers PSR4 | |
| * or your own PSR4 autoloader. See link reference below for a simple, and yet | |
| * effective PSR4 Autoloader I had made. | |
| * |
| /* Doubly Linked List implementation */ | |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct Node { | |
| int data; | |
| struct Node* next; | |
| struct Node* prev; | |
| }; |
| https://www.geeksforgeeks.org/php-sum-digits-number/ | |
| Armstrong number in PHP | |
| <?php | |
| $num=407; | |
| $total=0; | |
| $x=$num; | |
| while($x!=0) | |
| { | |
| $rem=$x%10; | |
| $total=$total+$rem*$rem*$rem; |
| <?php function array_flatten($array, $prefix = '') { | |
| $result = array(); | |
| foreach($array as $key=>$value) { | |
| if(is_array($value)) { | |
| $result = $result + array_flatten($value, $prefix . $key . '.'); | |
| } | |
| else { | |
| $result[$prefix.$key] = $value; | |
| } | |
| } |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):