TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-10-2010, 07:45 PM   #1 (permalink)
The Wanderer
 
JayGarland's Avatar
 
Join Date: Feb 2010
Location: London, England.
Posts: 7
Thanks: 5
JayGarland is on a distinguished road
Default Simple php help...

I'm so close to finishing my PHP project, I have a final question.

How do I use strip slashes and another one in my PHP..

Example:
I have
$tContent = bb($content);

How would I use strip slashes on that as well as the bb

All help is appreciated, thanks in advance.
JayGarland is offline  
Reply With Quote
Old 03-10-2010, 08:46 PM   #2 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

Do you mean you want to strip the slashes from the result of the bb() function?
if the result is a string you can just do this:
php Code:
$tContent = stripslashes(bb($content));
tony is offline  
Reply With Quote
The Following User Says Thank You to tony For This Useful Post:
JayGarland (03-13-2010)
Old 03-10-2010, 10:19 PM   #3 (permalink)
The Wanderer
 
JayGarland's Avatar
 
Join Date: Feb 2010
Location: London, England.
Posts: 7
Thanks: 5
JayGarland is on a distinguished road
Default

Thanks but no, I want to use both functions. BB and Stripslashes.
JayGarland is offline  
Reply With Quote
Old 03-10-2010, 10:37 PM   #4 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

You might have to elaborate on what you're trying to do - Tony's solution will work if you want to run two functions on the same content; most functions can easily be nested since they return results as opposed to echoing them to stdout.

The other option if you'd prefer is to simply run the two functions seperately on the same content.

php Code:
$content = bb( $content );
$content = stripslashes( $content );

// Equivalent to

$content = stripslashes( bb( $content ) );
delayedinsanity is offline  
Reply With Quote
The Following User Says Thank You to delayedinsanity For This Useful Post:
JayGarland (03-13-2010)
Old 03-11-2010, 11:32 AM   #5 (permalink)
The Visitor
 
Join Date: Mar 2010
Posts: 2
Thanks: 0
tanu is on a distinguished road
Default

I have just start my php course so can you give me some tips.

______________
boys room décor
Double Hung Windows
tanu is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
Tutorial for Beginners - Not a usual tutorial [Read it all and i think it will help] codefreek Absolute Beginners 8 01-26-2009 03:14 AM
PHP Compressor Kalle Script Giveaway 8 05-28-2008 12:14 AM
Simple PHP Login and Register System! Alex.Prisoner Advanced PHP Programming 1 04-12-2008 10:32 AM
Pure PHP template class. abiko Advanced PHP Programming 1 04-02-2008 05:45 PM


All times are GMT. The time now is 08:59 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design