Monthly Archives: January 2014

How to remove the last character in a string in PHP ?

snippets

How to remove the last character in a string in PHP ? You have a string, let’s say “1,2,3,4,5,6,7,8,” that is generated in a loop, and you want to remove the last comma that is occurred on the last position of the string, to obtain a string like this: “1,2,3,4,5,6,7,8”. 1st solution

2nd

Perl split string example

snippets

Perl split string example Perl split string function is one of the few perl functions used in string manipulation. It is similar to explode in php which will create for you an array with the pieces from the specified string. In this post snipped, you will see a quick example of how this can be

PHP mysql_real_escape_string example

mysql feature

PHP mysql_real_escape_string example PHP mysql_real_escape_string is a measure to prevent hackers from attacking your mysql database and leaking out specific information. Normally account level information that would then be used further in their attack and hacking your website completely. There are other PHP functions that could be used to prevent XSS attacks or sql injections,

The best PHP CMS Framework comparison

PHP Frameworks trends search

The best PHP CMS Framework comparison Lets say you are thinking of starting a project, an e-commerce project at that. Probably want to sell some products or services online, doesn’t really matter, but will involve having a billing account of some sort and ability to capture payments directly online. Sounds really fun right? Now, most of

Finally Facebook unblocked my website

facebook blocked unsafe

Finally Facebook unblocked my website If you are reading this page then chances are that you’ve search it due to being blocked by Facebook for posting your own website url. I myself have also been in the same situation where Facebook blocked my url but finally, after half a year, Facebook unblocked my site. Why

PHP explode equivalent for javascript

snippets

PHP explode equivalent for javascript Very often you have to perform operations on strings to split them, to obtain only a desired piece of it. If the string is formatted in a way that allows you to split, eg. you know the delimiters, you can use the following way to do this. Problem Let’s say

File backup script using cronjob

backup folder

File backup script using cronjob Just before the New Years a visitor was inquiring about how can he backup his account files, not just to backup the mysql databases. Well the process itself is similar, not that hard really. You do however need to understand that you should have access to the zip or tar

PHP math operations and operators

math

PHP math operations and operators PHP is a very powerful language that can help you to perform mathematical operations really easy. Math expressions are made up of operators and operands. You can perform easy operations like adding, subtracting, multiplying or dividing with PHP. Even comparison operators can be used with this language (greater than, less

Holidays are gone, 2014 officially starts

new year 2014

Holidays are gone, 2014 officially starts Hello from 2014 to all our users, I’m making this first post in this new year to wish all of you a happy and prosperous new year. I hope you guys enjoyed the holidays at least as much as me and looking forward for the new year. I’m happy

Request an article ←