PHP String functions | How to add slashes in the given string php tamil
addcslashes() function நாம் கொடுக்கும் string-ல் உள்ள character-களுக்கு முன்னால் backwardslases(\) add செய்கிறது.
addcslashes() Function in PHP
addcslashes() function நாம் கொடுக்கும் string-ல் உள்ள character-களுக்கு முன்னால் backwardslases(\) add செய்கிறது.
addcslashes ( $string , $charlist ) ;
Example1
<?php
$input = "I Love Coding";
echo addcslashes($input,'A..z');
?>
மேலே உள்ள Example1-ஐ கவனிக்கவும் addcslashes() என்ற function-இல் $input என்ற variable-இல் "I Love Coding" என்ற string மற்றும் A..z என்ற range argument-ஆக அனுப்பப்பட்டுள்ளது. A..z உள்ள ASCII value- க்கு ஏற்றவாறு நாம் முதல் agrument-ஆக அனுப்பி உள்ள string-இல் உள்ள character-களுக்கு முன்னால் addcslashes() function backwardslases(\) -ஐ add செய்கிறது.
\I \L\o\v\e \C\o\d\i\n\g
Example2
<?php
$data = "Peacock is My Favourite Bird";
echo addcslashes($data,'aeiou');
?>
மேலே உள்ள Example2-ஐ கவனிக்கவும் addcslashes() என்ற function-இல் $data என்ற variable-இல் "Peacock is My Favourite Bird" என்ற string மற்றும் 'aeiou' என்ற range argument-ஆக அனுப்பப்பட்டுள்ளது. 'aeiou' என்ற value- க்கு ஏற்றவாறு நாம் முதல் agrument-ஆக அனுப்பி உள்ள string-இல் உள்ள character-களுக்கு முன்னால் addcslashes() function backwardslases(\) -ஐ add செய்கிறது.
P\e\ac\ock \is My F\av\o\ur\it\e B\ird