Re: EREG PROBLEM
| From: | Georgie Casey | Date: | Fri, 13 Sep 2002 21:59:15 +0000 |
| Subject: | Re: EREG PROBLEM | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116322@lists.php.net to get a copy of this message | ||
input variable is as follows:
function showAnimLogo(rowPos) { if (logoAnimList[currentPage][rowPos] !=
null) [currentPage][rowPos],'preview','width=580,height=420'); } else
alert("This is an empty logo, select something else."); }}
function gotoAnimPage(showPage) { currentPage = showPage; for (var
i=0; i < maxCol; i++) { if (logoAnimList[showPage][i] != null)
var imgLogo = eval("document.logo"+(i+1)); imgLogo.src =
"http://www.server.com/data/anim/"+logoAnimList[showPage][i]+".gif";
}
else { var imgLogo = eval("document.logo"+(i+1)); imgLogo.src =
"http://www.server.com/data/anim/empty.gif";
} } }
document.write('<a class="mms3_b"
href="javascript:showAnimLogo(0);"><img
name="logo1" border="0" src="http://www.server.com/data/anim/82006.gif"
hspace="4" vspace="2"></a>');
document.write('<a class="mms3_b"
href="javascript:showAnimLogo(1);"><img
name="logo2" border="0" src="http://www.server.com/data/anim/82007.gif"
hspace="4" vspace="2"></a>');
document.write('<a class="mms3_b"
href="javascript:showAnimLogo(2);"><img
name="logo3" border="0" src="http://www.server.com/data/anim/82008.gif"
hspace="4" vspace="2"></a>');
document.write('<a class="mms3_b"
href="javascript:showAnimLogo(3);"><img
name="logo4" border="0" src="http://www.server.com/data/anim/82009.gif"
hspace="4" vspace="2"></a>');
statement is
$search = ereg('http://www.server.com/data/anim/(.+).gif',
$input,
$results);
returns the full string from 82007 onwards
"Kevin Stone" <kevin@helpelf.com> wrote in message
news:004b01c25b68$376bc010$6501a8c0@kevin...
> Post some of your code.
> Kevin
>
> ----- Original Message -----
> From: "Georgie Casey" <webmaster@filmfind.tv>
> To: <php-general@lists.php.net>
> Sent: Friday, September 13, 2002 2:13 PM
> Subject: [PHP] EREG PROBLEM
>
>
> > When I try and do an EREG search on a subject, putting results into a
> > $results array, the results[1] field returns from the first search
result
> to
> > the end of the subject, while i just want it to stop after the first
> result,
> > put the second result in results[2], etc. Instead i end up with nearly
the
> > whole subject in results[1] and nothing in results[2]
> >
> > I know that results[0] has just a copy of the subject
> >
> > --
> > Regards,
> > Georgie Casey
> > webmaster@filmfind.tv
> >
> > ***************************
> > http://www.filmfind.tv
> > Online Film Production Directory
> > ***************************
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>