Jump to content

[SOLVED] stripslashes


Clancy19

Recommended Posts

it does as it name implies. it strips slashes from a string. for example

<?php
$str = "Is your name O\'reilly?";

// Outputs: Is your name O'reilly?
echo stripslashes($str);
?>

 

btw, googlek, and php.net are your friends. if you want to eliminate all spaces (Ie " ") then you want to use string replace, like so

$newString = str_replace(" ", "", "Hello My name is Mikey!");
//output: HelloMyNameisMikey!

Link to comment
https://forums.phpfreaks.com/topic/176437-solved-stripslashes/#findComment-930023
Share on other sites

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.