Reply to Re: calling a function through user input.

Your name:

Reply:


Posted by Mohawk Mawk on 05/04/07 18:49

>But galery will recieve an array of matches, not just an id, so you'll maybe
>need to modify it a bit. Also I haven't tested this at all, the example is
>just to illustrate the idea...

thank you very much, I inserted a handling function:


function garray($input){
return gallery($input[1]); /* $input[0] is '[GID=X]' and $input[1]
is 'X' */
}

$news="See my galleries one [GID=1] and two [GID=2]";
echo preg_replace_callback('/\[GID=([\d]+)\]/', 'garray', $news);

it works like a charm, this is the beginning of a whole bunch of new
possibilities for the administrator to write news.
thank you very much

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация