I have various column names within double quotes, separated by commas.
Example:
"column one", "column number two", "this is column number three", anothercolumn, yetanothercolumn
I need to eliminate the double quotes and replace the blanks within the double quotes by underscores, giving:
... (5 Replies)
Hi,
I am getting the data from text file and it contains comma and double quootes.
Eg: text file like this:
Travelling up Cattai Ridge Rd, going through the "S" bends at the top.
Felt a "pull" and pain in groin area, on right side after lifting at work.
Repeat "twisting" while working manual... (4 Replies)
Hi,
I have data as
"01/22/97-"aaaaaaaaaaaaaaaaa""aaa""aabbbbbbbbcccccc""zbcd""dddddddddeeeeeeeeefffffff"
I want to remove only the Consequitive double quotes and not the one which occurs single.
My O/P must be ... (2 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hello experts,
I need to validate a csv file which contains data like this:
Sample.csv
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
I just need to check if all the records contain exactly the number of... (5 Replies)
Hi Guys,
I have a file with content as below
aj.txt
"Iam
allfine" abcdef
abcd "all is
not well"
What I'm trying to say is my data has some new line characters in between quoted text. I must get ride of the newline character that comes in between the quoted text.
output must be:... (8 Replies)
Hi Froum.
I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is.
I have the following data:
Before:
... (32 Replies)
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
I need to replace consecutive double quotes in a csv file, the data in the file is enclosed in double quotes but there are some places where the quotes are repeating
Example is below
Incoming data is :
"Pacific Region"|"PNG"|"Jimmy""|""|
Need output as:
"Pacific... (10 Replies)
Please use code tags
Hi,
I have input data is below format and n of column in the multiple flat files. the string data has any double quotes(") values replaced to double double quotes for all the columns{"").
Also, my input flat file each column string data has carriage of new line too.... (14 Replies)
Discussion started by: SSrini
14 Replies
LEARN ABOUT PHP
htmlspecialchars_decode
HTMLSPECIALCHARS_DECODE(3) 1 HTMLSPECIALCHARS_DECODE(3)htmlspecialchars_decode - Convert special HTML entities back to charactersSYNOPSIS
string htmlspecialchars_decode (string $string, [int $flags = ENT_COMPAT | ENT_HTML401])
DESCRIPTION
This function is the opposite of htmlspecialchars(3). It converts special HTML entities back to characters.
The converted entities are: &, " (when ENT_NOQUOTES is not set), ' (when ENT_QUOTES is set), < and >.
PARAMETERS
o $string
- The string to decode.
o $flags
- A bitmask of one or more of the following flags, which specify how to handle quotes and which document type to use. The default
is ENT_COMPAT | ENT_HTML401.
Available $flags constants
+--------------+---------------------------------------------------+
|Constant Name | |
| | |
| | Description |
| | |
+--------------+---------------------------------------------------+
| | |
| ENT_COMPAT | |
| | |
| | Will convert double-quotes and leave single- |
| | quotes alone. |
| | |
| | |
| ENT_QUOTES | |
| | |
| | Will convert both double and single quotes. |
| | |
| | |
|ENT_NOQUOTES | |
| | |
| | Will leave both double and single quotes uncon- |
| | verted. |
| | |
| | |
| ENT_HTML401 | |
| | |
| | Handle code as HTML 4.01. |
| | |
| | |
| ENT_XML1 | |
| | |
| | Handle code as XML 1. |
| | |
| | |
| ENT_XHTML | |
| | |
| | Handle code as XHTML. |
| | |
| | |
| ENT_HTML5 | |
| | |
| | Handle code as HTML 5. |
| | |
+--------------+---------------------------------------------------+
RETURN VALUES
Returns the decoded string.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.4.0 | |
| | |
| | The constants ENT_HTML401, ENT_XML1, ENT_XHTML |
| | and ENT_HTML5 were added. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
A htmlspecialchars_decode(3) example
<?php
$str = "<p>this -> "</p>
";
echo htmlspecialchars_decode($str);
// note that here the quotes aren't converted
echo htmlspecialchars_decode($str, ENT_NOQUOTES);
?>
The above example will output:
<p>this -> "</p>
<p>this -> "</p>
SEE ALSO htmlspecialchars(3), html_entity_decode(3), get_html_translation_table(3).
PHP Documentation Group HTMLSPECIALCHARS_DECODE(3)