
|
Home > Code snippets > PHP > Strings Code Snippets from Category StringsRemove Invalid XML CharactersWhen you are writing out an XML document there are certain characters that are not allowed in the document. If these characters exist, you will be unable to parse the document as per the XML specification.What this function will do is take a string, remove the invalid characters and then return the string back to you to insert into an XML document. Get first lineTruncate a given multi-line string by returning only a limited length substring from its first line. Add suspension points or other (provided) continuation mark if the string is truncated in-process; the input string is returned as-is if it does not contain new-line characters and its length is smaller than required. human_bytesDisplays bytes in the nearest manageable unit Got one? Create it now. View the most popular snippets.
|
||||||||||||
|
PHPEdit User Community, © 2008 WaterProof SARL
|
||||||||||||