Hi!
I've been quite curious about all the strange signs around in different php plugins which are open-source on the net.. And here is one example of which signs I'm thinking of:
"([a-zA-Z0-9_-]+))|e" what is that? :OCode:$article->text = preg_replace('|(http://www.youtube.com/watch\?v=([a-zA-Z0-9_-]+))|e', '$this->youtubeCodeEmbed("\2")', $article->text); function youtubeCodeEmbed( $vCode ) { $plugin =& JPluginHelper::getPlugin('content', 'youtubeembed'); $params = new JParameter( $plugin->params ); $width = $params->get('width', 425); $height = $params->get('height', 344); return '<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$vCode.'"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/'.$vCode.'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed></object>'; }
(Might be a quite stupid question to ask... thinking of that I've been programming for almost 12 years now xD Though did I start for the PHP the last year, and hadn't heard of it before that ^^)
I've seen these all over.. In strings and stuff.. And some in JavaScript too..
What are they for, what do they mean, and how can I use them to help me?
Cheers,
Artheus


Reply With Quote

Bookmarks