|
Posted by R. Rajesh Jeba Anbiah on 06/20/06 15:20
Dan Pearce wrote:
<snip>
> However when I try and read from a text file using
>
> $s = file('./wiki.txt');
> $search = array ( '@/(.*?)/@si',
> '@\*(.*?)\*@si');
> $replace = array ( '<i>\1</i>',
> '<b>\1</b>');
>
> echo preg_replace($search, $replace, $s);
>
> ?>
>
> All that is shown is the single word 'Array'. This confuses me a lot as
<snip>
file() returns array <http://in2.php.net/file>. You may want
<http://in2.php.net/file_get_contents>
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
Navigation:
[Reply to this message]
|