Guest User

Untitled

a guest
Jun 25th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?PHP
  2.  
  3. function strReplaceAll($needle, $replacement, $haystack)
  4. {
  5. // Check for infinite loop. (NOT FOOL PROOF!)
  6. if(strpos($replacement, $needle) === FALSE)
  7. return;
  8.  
  9. $numReplacements = 42;
  10.  
  11. while($numReplacements)
  12. {
  13. $haystack = str_replace($needle, $replacement, $haystack, &$numReplacements);
  14. }
  15.  
  16. return $haystack;
  17. }
  18.  
  19. ?>
  20.  
  21. <style type="text/css">
  22. /*
  23. <![CDATA[
  24. */
  25.  
  26. <?PHP echo sstrReplaceAll(']]>', '', $userCss); ?>
  27.  
  28. /*
  29. ]]>
  30. */
  31. </style>
Add Comment
Please, Sign In to add comment