MySQL variant for PHP’s in_array

So you have an array, let’s call it $array. $array = array('one', 'two', 'three'); And you want to do a MySQL query that will check if one of the values in the array are present or similar or whatever. In PHP it would look like this: if... 

Fetch MP3 Tags from Last.fm Using PHP

Today I’m gonna show you a script that I did for a project of mine that fetches the tags from LastFM and updates the database inserting the top 5 tags from their database and leaves your tags as they are. I believe it could be a lot less messy but I am too lazy... 

Help me Test my Mailing List System

I’m developing my very own mailing list system and need you to help me test it All you have to do is subscribe to it on the right, it is free, quick and doesn’t hurt (you will also get a verification email, which you should check and click the link included). Since... 

Let's Make A Website Together

I thought about a nice and simple project.. I will write a step by step tutorial on how to create a simple website. Why? Because I’m bored and don’t know what to do in my free time. I will show you how to design a simple layout with CSS and how to use PHP... 

How to str_replace in mysql

I recently bought a database with 170.000 entries, all of which had some stupid link at the end of one of their fields. Let’s say it was a cocktail recipes database and the links in the end were some advertisements like “if you want more recipes visit blahblah”. I... 

Create an array for a tag cloud in PHP

Everyone tells us how to create a tag cloud with an array.. but how to actually create the array with the data that we fetch from our database? This is how I do it. The table we are working in is “pictures” and the field with the tags is “tags“.... 

How to update multiple mysql rows with PHP

Did you ever want to be able to update a dynamic number of rows in your mysql table and didn’t know how? For example: like on myspace when you edit your photo album, you have a gallery and you list one of your albums with x pictures in it. You want to be able...