PHP

PHP Menu

PHP

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

Definition

The addcslashes() function returns a string with backslashes before the specified characters.

Syntax

addcslashes(string, characters)

Parameters

Parameter Description
string Required. Specifies the string to be escaped.
characters Required. Specifies the characters or range of characters to be escaped.

Example

<?php
$str = addcslashes("Hello World!","e"); echo($str);

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods