This helped on my laptop (win2000, Apache 1.3.26, php 4.2.1, but when I uploaded to my webserver (SunOS (sparc), Apache 1.3.xx, php 4.0.6) only the first row was numbered (yes, I even tried \n instead). Is there another solution that could work?
"Rasmus Lerdorf" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED]... > So just replace \r then. And use str_replace() instead of ereg_replace(). > > -Rasmus > > On Thu, 8 Aug 2002, Øystein Håland wrote: > > > I use the following script found at php.net: > > <html><body><ol><li> > > > > <? > > ob_start(); > > show_source( "THE_FILE!" ); > > $t = ob_get_contents(); > > ob_end_clean(); > > echo ereg_replace( "<br />" , "</li><li>" , $t ); > > ?> > > </li></ol></body></html> > > > > Since the ereg_replace don't work with my php-code i just do > > echo $t; > > instead. > > What I want is to do something like this: > > echo ereg_replace( "\r\n" , "</li><li>" , $t ); > > (my files are created in a win2000-environment), but this gives the > > linenumber only for the first line. Anyone see a solution to this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php