Better Websites Starting @ Just $500
slideshow 1 slideshow 1 slideshow 1 slideshow 2 slideshow 4 slideshow 5

How the heck do I set up my Facebook business page???

I am on Facebook every day and I still get lost in its menus, options, and general busyness. And of course, there is no easy way to find step by step instructions.

So Here It Is

The absolute easiest way to do it...

Remove All Slashes From Forms Using PHP Regular Expressions

When you submit this form the php script will remove all the backslashes and print the output below.



This is the output:

The following function may come in handy is for all sorts of php validation. It is (not completely) guaranteed to stop \n\r in its tracks. I had a hard time finding a good php function to strip an arbitrary number of slashes so I figured I would share this. After much searching, I finally found a super compact way to remove slashes...
$dirtyString = '\r\n';
$badFriends = '/(\\\)/';
$noMoreSlashes=preg_replace($badFriends, '', $dirtyString);
echo $noMoreSlashes;
output: rn

Looks easy at first, but then you may ask yourself why would you need three backslashes in the expression just to find one in the string?

Open The SOC Drawer For More Writings