How the heck do I set up my Facebook business page???
Submitted by Socs on Thu, 01/13/2011 - 15:26I 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...
- 1. Login to Facebook.
- 2. Follow or copy and paste this link http://www.facebook.com/pages/create.php.
- 3. Create an offical page (its the box on the right).
Remove All Slashes From Forms Using PHP Regular Expressions
Submitted by Socs on Sat, 01/01/2011 - 02:10When 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?