Programming

PHP, Perl, Pyhon, bash, javascript and jQuery and probably other languages to come. This category is all about programming!


Drag and drop on mobile devices

Drag and drop on mobile devices I had a problem in the past with a draggable and droppable calendar with jQuery and ajax. When you add drag and drop to a web page using JavaScript, such as jQuery UI draggable and droppable, you obtain a problem. The dragging and dropping are intercepted by the phone

PHP Simple HTML DOM Parser

domTree

PHP Simple HTML DOM Parser In this tutorial I will show you a great way to parse a webpage with plain PHP, in the same way you do with jquery. The syntax is very native and natural, and you will feel like home using it but first let’s thank the author of this library S.C. Chen

PHP Smarty var_dump alternative and prestashop errors

var_dump

PHP Smarty var_dump alternative and prestashop errors If you work on prestashop for example, and you want to make a debug for all or a certain variable from within a page you will have problems because you cannot use var_dump since Smarty is a templating language for PHP. Method 1

Method 2

Method

Transform a csv file to associative array in PHP

csv

 Transform a csv file to associative array in PHP There are a lot of  examples on how to take a CSV file and put it in an array, but the main problem about them is that the header and the rest of the content from the csv are placed on separate keys, both on the

Working with Entities in Symfony2

Working with Entities in Symfony2 Symfony is a very powerfull PHP framework that helps you do amazing projects in small amount of time. It has built in support for Doctrine which is an incredible tool for interacting with databases, not through tables but through php objects. First let’s see what is an ORM and after that

How to do a batch insert in MySQL?

mysql feature

How to do a batch insert in MySQL? In this tutorial, I will present you how to do a batch insert in mysql. Let’s say you want to insert some informations from an array into the database. In order for this to work efficient, you should have more than one information in that array. Why

How to sort a multidimensional array based on key?

snippets

How to sort a multidimensional array based on key? First of all, let’s give credit to the person who wrote this function. The problem ? Let’s say you have a multidimensional array and you want to sort based on a key that is not on the first level of the array, how would you do

6 free mobile device emulators for testing your app

responsinator

6 free mobile device emulators for testing your app If you made at least one website that was responsive, you certainly know how important these tools are. Here is a list with helpful websites in which I tested my apps during and after development. This is NOT a top, just a list. 1) Responsinator Responsinator

Remove html tags and malicious content in php

malicious

Remove html tags and malicious content in php Let’s say you have some data that are coming from the client side (a form submit, an ajax call, etc) and you want to be sure that you are not inserting in the database malformed data with html tags or other stuff. In the end you would need

Request an article ←