Jump to content

[SOLVED] Filtering User Input and EXPLODEing


kingnutter

Recommended Posts

Hi everyone,

 

A user input page on the site I am creating has a field in which to enter comma separated tags.

 

For searchabilty I intend to EXPLODE them into a separate table.

 

I have been advised to check for empty elements which seems straightforward, but also check for multiple commas.

 

Could somebody let me know the correct PHP code with which to do this? Maybe I should strip it of characters along with any other potential rogue characters?

 

Also, should I do this BEFORE exploding the tag list into an array, or for each array element after exploding.

 

Many thanks,

Gary

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.