PHP

PHP Menu

PHP

addslashes() Function - Definition, Syntax, Parameters, Examples

Definition

The addslashes() function returns a string with backslashes before the characters that need to be escaped. These characters are single quote ('), double quote ("), backslash (\) and null.

Syntax

addslashes(string)

Parameters

Parameter Description
string Required. Specifies the string to be escaped.

Example

<?php
$str = addslashes("Jobtensor's PHP Tutorials"); echo($str);

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods