Category: PHP

  • The Most Common Mistakes CakePHP Developers Make : A Tutorial for Beginners

    CakePHP is an amazing PHP framework, but it has a steep learning curve! It requires a good amount of research and training to become an expert. I have been fortunate to use CakePHP for over 7 years now, and in that time I’ve had the honor of working with many members of the CakePHP community. In…

  • Data Encoding: A Guide to UTF-8 for PHP and MySQL

    As a MySQL or PHP developer, once you step beyond the comfortable confines of English-only character sets, you quickly find yourself entangled in the wonderfully wacky world of UTF-8. A Quick UTF-8 Primer Unicode is a widely-used computing industry standard that defines a comprehensive mapping of unique numeric code values to the characters in most of today’s written…

  • Building REST API for Legacy PHP Projects

    Building or architecting a REST API is not an easy task, especially when you have to do it for legacy PHP projects. There are a lot of 3rd party libraries nowadays that make it easy to implement a REST API, but integrating them into existing legacy codebases can be rather daunting. And, you don’t always…

  • Before Debugging PHP That’s Not Working, Consult This List of the 10 Most Common Mistakes That PHP Developers Make

    PHP makes it relatively easy to build a web-based system, which is much of the reason for its popularity. But its ease of use notwithstanding, PHP has evolved into quite a sophisticated language with many frameworks, nuances, and subtleties that can bite developers, leading to hours of hair-pulling debugging. This article highlights ten of the more common…

  • PHP Best Practices and Tips

    Manage Your Dependencies in PHP with Composer What Is a Dependency? PHP is a great language to create web projects. One of the things you will see when using PHP is that there is a library for almost anything you need. A dependency in your project is a library or package that your code uses…

  • Getting the Most Out of Your PHP Log Files: A Practical Guide

    It could rightfully be said that logs are one of the most underestimated and underutilized tools at a freelance php developer’s disposal. Despite the wealth of information they can offer, it is not uncommon for logs to be the last place a developer looks when trying to resolve a problem. In truth, PHP log files should in many…

  • Building an IMAP Email Client with PHP

    Building an IMAP Email Client with PHP

  • The Vital Guide to PHP Interviewing

    The Vital Guide to PHP Interviewing

  • Show limited words in PHP from string with HTML tags

    Hi, Here i have create another function called “truncate”. With this function you can show limited words with HTML tags. I know there is a function in PHP “SUBSTR”. but the main issue i face with this is this will also remove HTML tags, which mean when any tag starts then that tags will not…

  • SEO friendly URL generator

    Hi, here is a function which I create for generating SEO friendly URL. first we have to create a function called “friendlyURL”. here is a code <?php function friendlyURL($inputString){ $url = strtolower($inputString); $patterns = $replacements = array(); $patterns[0] = ‘/(&amp;|&)/i’; $replacements[0] = ‘-and-‘; $patterns[1] = ‘/[^a-zA-Z01-9]/i’; $replacements[1] = ‘-‘; $patterns[2] = ‘/(-+)/i’; $replacements[2] = ‘-‘;…