return preg_replace_callback("/\[video\](.+?)\[\/video\]/", 'embed_video', $Text);
function embed_video($matches)
{
return $matches[1] . 'foo';
}
More Related Contents:
- How do I remove the URL protocol and slash from user input in PHP
- PHP parse/syntax errors; and how to solve them
- PHP syntax for dereferencing function result
- Deprecated: mysql_connect() [duplicate]
- Replace URLs in text with HTML links
- How can I handle the warning of file_get_contents() function in PHP?
- Replacing accented characters php
- What is the difference between a language construct and a “built-in” function in PHP?
- Ignore html tags in preg_replace
- Notice: Trying to get property of non-object error
- Are PHP functions case sensitive?
- How to get JavaScript function data into a PHP variable
- How would I skip optional arguments in a function call?
- PHP remove special character from string
- Shorten long numbers to K/M/B?
- Regular expressions for a range of unicode points PHP
- PHP function with variable as default value for a parameter
- Function list of php file
- How to remove diacritics from text?
- PHP using preg_replace : “Delimiter must not be alphanumeric or backslash” error
- Why are PHP function calls *so* expensive?
- Get variables from the outside, inside a function in PHP
- PHP – Add link to a URL in a string
- Jquery ajax setTimeout after form succes not redirecting?
- Undefined variable problem with PHP function
- Cannot redeclare function php [duplicate]
- PHP get all arguments as array?
- regular expression and forward slash
- Can a PHP function accept an unlimited number of parameters? [duplicate]
- Use Variable as Function Name in PHP [duplicate]