Jump to main content Jump to doc navigation

xPDOCacheManager.escapeSingleQuotes

Other versions: 3.x — Found a problem? Please edit this page or report an issue.

xPDOCacheManager::escapeSingleQuotes

Escapes all single quotes in a string.

Syntax

API Docs: http://api.modxcms.com/xpdo/cache/xPDOCacheManager.html#escapeSingleQuotes

string escapeSingleQuotes (string $s)

Example

Escape the quotes in the string below:

$str = 'Testing my "fun" Windows system.';
echo $xpdo->cacheManager->escapeSingleQuotes($str);
// outputs: Testing my \"fun\" Windows system.

See Also

  1. xPDOCacheManager.copyFile
  2. xPDOCacheManager.copyTree
  3. xPDOCacheManager.delete
  4. xPDOCacheManager.deleteTree
  5. xPDOCacheManager.endsWith
  6. xPDOCacheManager.escapeSingleQuotes
  7. xPDOCacheManager.get
  8. xPDOCacheManager.getCachePath
  9. xPDOCacheManager.getCacheProvider
  10. xPDOCacheManager.matches
  11. xPDOCacheManager.replace
  12. xPDOCacheManager.writeFile
  13. xPDOCacheManager.set
  14. xPDOCacheManager.writeTree
  15. xPDOCacheManager