Advertisement
jargon

PHP Tag replace glitch

Apr 30th, 2021
1,585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. Why does this not replace {{Title}} with jpp?
  2. trk_fastswap( $pagedata, 'Title', 'jpp' );
  3.  
  4. echo $ret;
  5.  
  6. function trk_fastswap( &$haystack = '', $needle = 'Title', $replacement = 'jpp' )
  7. {
  8.     str_replace( '{{' . $needle . '}}', $replacement, $haystack );
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement