Can some1 explain this 2 me
Posted: Tue Oct 01, 2002 4:01 pm
I am trying to build a page that uses popup windows for some of it links, i was wondering if i could use a modified version of this script to change links typed in to text to the java link. eg: if some1 writes:$data = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)',
'\\1<a href="http://\\2" target="_blank">\\2</a>', $data);
$data = eregi_replace('([[:space:]()[{}])(http://[-a-zA-Z0-9@:%_\+.~#?&//=]+)',
'\\1<a href="\\2" target="_blank">\\2</a>', $data);
[POPUP]http://mypage.htm.
then the script could change it to:
<p class="smalltext" onMouseOver="MM_openBrWindow('http://pypage.htm','popup','width=600,height=400')">click here</p>
but if they wrote [link]http://mypage.htm. then it would change it to <a href="mypage.htm target="_blank">click here</a>
NE way that what i was hopeing to do, but really i was hopeing some1 could explain how that script works, cous i've been learning php for about 6hours and i've been doing ok, but this stumped me